Site icon Hip-Hop Website Design and Development

International $publish returns 2 objects for my shortcode

I made a shortcode, it does most of what I would like it to do. Apart from a filter I would like the publish id of the web page the shortcode is positioned. (to get some linked customized subject values)
And I can not anticipate the individuals who’re going to make use of this shortcode to get the publish ID and use in an parameter for the shortcode. So I would like the shortcode itself to get it.

Easy.

international $publish;
$post_id_i_need = $post->ID;

However on my testpage (id 111) $post_id_i_need returns 111307
(307 is the id of the final publish that’s displayed afterward in loop from a wp_query)
printing the whole $publish reveals 2 wp publish objects

WP_Post Object ( [ID] => 111 ... ) WP_Post Object  ( [ID] => 307 ... )

I additionally tried:

get_queried_object_id()

This will get me 111111 on echo. int(111) int(111) on var_dump.

I assume I can do one thing to separate this up – cannot work out how.

However I used to be questioning if I am lacking one thing and if I must get the ID another means.

I additionally want it to be a shortcode (as a substitute of a web page template) as they want to have the ability to place it anyplace within the web page with the web page builder.