So, I have a news website. The designers want me to have a link in the menu that says “Latest News - [time of the last post]”.

I know I can get the datetime of the latest post with get_lastpostdate().

But how can I put this php code inside the menu? This specific link is not the first one nor the last. It’s inside the menu structure. Menus in this website are made trough the usual custom menu tools of wp.

Any ideas?

Read more here: How to add a code for lastpostdate after/inside a specific menu link?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: