Get get_the_ID() on single post

Posted in: Newspaper
Post count: 11

Hello, I have a plugin that displays certain information based on certain post IDs. I got the plugin shortcode to display it on the “single page” template. My problem is get_the_ID() / or global $post which is used to retrieve this information, gave me the model ID. How can I access this information please: unique item id
Greetings

Post count: 27744

Hello,

Please use the element Single External shortcode https://prnt.sc/3h7fOP94G9U3 and check after.

Thank you!

Post count: 11

Hi,
I needed for my plugin, and using an additional module on template will probably delay execution.
For thoses who need this is what I used :
url_to_postid($_SERVER[‘REQUEST_URI’]) <= single post
get_page_by_path($_SERVER[‘REQUEST_URI’]) <= page
Thank you.

Post count: 27744

Hi,

Can you tell me for what you want to use this code?

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.