[Resolved] post meta not generated

Home Forums Support [Resolved] post meta not generated

Home Forums Support post meta not generated

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #755285
    Silvio

    hi,

    I am using this code to customize post meta

    add_filter( 'generate_post_author', '__return_false' );
    add_filter( 'generate_show_comments', '__return_false' );
    add_filter( 'generate_show_categories', '__return_false' );
    add_filter( 'generate_post_date_output', 'tu_fancy_byline' );
    function tu_fancy_byline() {
        printf( ' <span class="byline">%1$s</span>',
            sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%4$s<a href="%1$s" title="%2$s" rel="author"><span class="author-name" itemprop="name">%3$s</span></a></span>',
                esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
                esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
                esc_html( get_the_author() ),
                '<img src="/wp-content/uploads/2016/07/silviogulizia-avatar-rotondo.png" alt="" />'
            )
        );
    
        $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) );
    
        printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', // WPCS: XSS ok, sanitization ok.
            esc_html_x( 'Categories', 'Used before category names.', 'generatepress' ),
            $categories_list
        );
    
        // echo '<span class="reading-time">Tempo di lettura: ADD SHORTCODE</span>';
      
    }

    whil on the blog page I can see the post meta, on the single post the post meta is not showed.

    #755679
    Leo
    Staff
    Customer Support

    Hi there,

    Is the post date for single post set to display?
    https://docs.generatepress.com/article/blog-content-layout/#single

    #755873
    Silvio

    thanks, I didn’t realize the hook was the date.

    #755991
    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.