How to display the post id to visitors on the front end?

Posted in: Newspaper
Post count: 5

Good day to you all.
I would like to have the articles “Post ID” also visible to visitors when they read articles on the front end, how would i do this?

I am using extra code via a plugin to show post ids in the dashboard, i have also added extra code to let me search for post ids in the backend.

I would like to either add the post id to the end of the title, or add it as an extra display next to the….

“Author Name” – “Publish Date” – “(#Post Id)”

Many thanks
Carl

Post count: 21065

Hello Carl!

Unfortunately, there is no option in our theme to do this automatically. Please check this video: https://www.youtube.com/watch?v=1cnKJl2rzMs

Hope that helps you!

Thank you!

Post count: 5

Thankyou.
Thats great, actually the back end was easy to do, either a snippet of code or a plugin does the trick.

the question now is “How do i display this on the post page?”

google searching isnt getting me the answer yet 🙂

can i use php code? a shortcode? a plugin? edit the files?

I will reply if i find it?

many thanks
Carl

Post count: 35449

Hi Hawkmedia,
I think that there are more ways to do this, maybe there are even some plugins that can do this.
If you want you can check this guide -> https://rudrastyh.com/wordpress/get-post-id.html, maybe it can help you.
Thank you!

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