Hi @robert,
I would like to display (near by the link icon maybe) the post ID number of each and every post in my forums (the number that is included in the URL within the link icon).
Is this possible??
It would allow me to make explicit the Post Number that identifies each post in the forums. If I'm correct, this number is incremental and unique. ID numbers from deleted posts never get used again. So this number becomes a perfect reference ID for any post (topic, reply, comment, question, answer) and we could use it precisely as a dependable, quick, and short reference to a post, without the need to write nothing else, for example in an email: "Please do remember that we discussed this issue in post #123 and we decided bla bla bla…"
At the same time, it could become "searchable" (be part of the search dialog):
Go To Post #: [ 123 ]
Making it easier, quickier and more precise to get "right to the substance" of any forum.
Thanks.
-----
PS: After posting this topic, I can check via the link icon that it is the post #25519
This is the number I'm interested to be able to display.
Hi @jorgew,
I'm sorry but there is no an easy way to do this. You should use template file customization instruction to customize the post.php file of the forum layout you use.Here is the documentation: https://wpforo.com/docs/root/forum-themes/theme-customization/
You should insert PHP code to display post ID:
<?php echo intval($post['postid']); ?>
Hi @robert,
It works just as I wanted, take a look.
There is only one problem, it seems that 'postid' is not the variable name for comment ID in Q+A layout (classic theme). It will, for example, display "0" when the URL indicates that it is post 287 (seen at the bottom left)
Can you help me with this issue?
Comments are located in classic/layouts/3/comment.php file, you should use this variable:
<?php echo intval($comment['postid']) ?>