Site logo

Archived topic

How to show current date on all posts.

1 reply · Started by laidbackluke on February 5, 2020

Viewing posts 1–2 of 2

Hello,

I want to display the current date on all posts.

I remember reading in a group that I can add the below code snippet as a hook, or in the html of a post.

<i aria-hidden="true"></i> <?php echo date('l jS F Y'); ?></li>

However, what is a hook, and how do I add the code as a hook? Do I have to go into actual php files as detailed here:

https://www.greengeeks.com/tutorials/article/how-to-show-todays-date-in-wordpress/

Thanks,
Luke

Hi there,

Hooks are like named placeholders within WordPress and GP Themes code. They simply allow you to 'hook' your own code into different places. GPP makes it real easy with the Hook Element:

https://docs.generatepress.com/article/hooks-element-overview/

Check out that doc - then let us know if you need any help

This archived topic is closed to new replies.