• Hi.

    This part of your plugin displays the Related Posts listing under the content:

    <?php if ( count( get_the_category() ) ) : ?>
            <span class="cat-links">
                <?php printf( __( '<span class="%1$s">See related Videos</span> %2$s', 'posts-in-page' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
            </span>
        <?php endif; ?>

    Can you please tell me how I can alter this code to exclude one Category name from the list that it generates…?? The category name that I want to exclude is “TopONLY” and its ID is 11.

    I want to just exclude this category name from this list only but not prevent posts from being displayed on this page from that category.

    Thanks in advance.

  • The topic ‘Hide a category name from the Related Posts listing’ is closed to new replies.