• Resolved bswb97

    (@bswb97)


    I’m taking over a site that uses a custom template. Various aspects of the site are a bit of a mess and one strange thing I’ve found is that the categories show up in the meta field but tags do not.

    Here is the code for my meta field starting at the loop:

    <?php while ( have_posts() ) : the_post() ?>
    
    (I deleted the byline meta and content stuff)
    
    <div class="entry-utility">
    							<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'bbf' ); ?></span><?php echo get_the_category_list(', '); ?></span>
    							<span class="meta-sep"> | </span>
    							<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'bbf' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>
    							<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'bbf' ), __( '1 Comment', 'bbf' ), __( '% Comments', 'bbf' ) ) ?></span>
    							<?php edit_post_link( __( 'Edit', 'bbf' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>
    
    </div><!-- #entry-utility -->
    
    (deleted PHP for navigation and max posts)
    
    <?php endwhile; ?>

    I experimented by removing the metadata and adding the standard <?php the_tags(); ?> in its place but nothing was generated.

    Help please? 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • If there is no tag assigned to the post, nothing will appear.

    Check the post first if any tag assigned to it.

    Thread Starter bswb97

    (@bswb97)

    Duh. All that time looking at PHP code and it’s the simplest fix of checking for tag usage. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Categories showing but tags are not’ is closed to new replies.