[Resolved] generate_post_date_output not working when generated in an element

Home Forums Support [Resolved] generate_post_date_output not working when generated in an element

Home Forums Support generate_post_date_output not working when generated in an element

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2351451
    Dave

    Hi,

    The generate_post_date_output filter does not / is not working when you generate your post_date inside an element. Should it??

    i.e.

    I’ve a local development environment with a copy of my live site and all the plugins disabled except GP.

    In my child theme I have just this in my functions.php:

    add_filter( 'generate_post_date_output', function( $output, $time_string ) {
        return sprintf('WHY IS THIS NOT DOING ANYTHING???');
    }, 10, 2 );

    My custom header elements looks like this:

    <h1>
    	{{post_title}}
    </h1>	
    	<p class="hero_meta">
    		 {{post_author}} | {{post_date}} | {{post_terms.category}}
    </p>

    IF this is desired behaviour and not a bug, how can I customise the post_date output when I’m generating it inside a header element?

    #2351473
    Dave

    Actually, nevermind I think I figured it out from another post on here. I made a shortcode to do what {{post_date}} does so I can customize it.

    #2351873
    Ying
    Staff
    Customer Support

    Glad you sorted it out 🙂

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