Site logo

Archived topic

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

17 replies · Started by Paul on June 14, 2017

Viewing posts 16–18 of 18

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;
}

Thanks heaps, works perfect

You're welcome :)

This archived topic is closed to new replies.