Site logo

[Support request] Adding post date to posts

Home Forums Support [Support request] Adding post date to posts

Home Forums Support Adding post date to posts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2467318
    Sean

    Hello!

    I’d like to include the post date on my posts. I’ve updated the customization/layout/blog sections on archives and single. I’m seeing the post date in the archive, but not on my single posts. I have previously requested help to display the categories and tags on the top of my posts and I think there might be some interference here. here’s the PHP I was given that’s running on my site:

    add_filter( 'generate_header_entry_meta_items', function($item) {
       if (is_single()) {
          return array(
    		  'post_date',
            'categories',
    		'tags'
          );
       }
    	return $item;
    } );

    (I think I added “post_date” myself to try and fix it, which didn’t work)

    Thanks!

    Edit to add post example: https://www.remembryo.com/rct-finds-no-change-in-birth-rates-for-standard-or-era-timed-euploid-transfer/

    #2467383
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try replacing post_date with date?

    See more info here:
    https://docs.generatepress.com/article/generate_header_entry_meta_items/

    #2467434
    Sean

    Perfect! Thank you.

    #2467494
    Leo
    Staff
    Customer Support

    No problem 🙂

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