Site logo

[Support request] How to show current date on all posts.

Home Forums Support [Support request] How to show current date on all posts.

Home Forums Support How to show current date on all posts.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1156203
    laidbackluke

    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

    #1156341
    David
    Staff
    Customer Support

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.