[Resolved] Custom Post Type not showing Author, Date and other Meta Data

Home Forums Support Custom Post Type not showing Author, Date and other Meta Data

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #506158
    Tom
    Lead Developer
    Lead Developer

    Try replacing your last function with this:

    add_action( 'generate_after_entry_content', 'tu_cpt_footer_meta' );
    function tu_cpt_footer_meta() {
        if ( 'post' == get_post_type() || 'club' == get_post_type() ) : 
            $club_cats = get_the_term_list( get_the_ID(), 'club_category', $before = '', ', ' );
            $club_tags = get_the_term_list( get_the_ID(), 'club_tags', $before = '', ', ' );
            ?>
            <footer class="entry-meta">
                <?php generate_entry_meta(); ?>
                <?php if ( ! empty( $club_cats ) ) : ?>
                    <span class="cat-links"><?php echo $club_cats; ?></span>
                <?php endif; ?>
    
                <?php if ( ! empty( $club_tags ) ) : ?>
                    <span class="tags-links"><?php echo $club_tags; ?></span>
                <?php endif; ?>
    
                <?php if ( is_single() ) generate_content_nav( 'nav-below' ); ?>
            </footer><!-- .entry-meta -->
        <?php endif;
    }
    #506612
    Paul

    Thanks heaps, works perfect

    #507106
    Tom
    Lead Developer
    Lead Developer
Viewing 3 posts - 16 through 18 (of 18 total)
  • You must be logged in to reply to this topic.