WordPress.org

Ready to get started?Download WordPress

Forums

show only certain link categories on certain posts (2 posts)

  1. Mark Steggles
    Member
    Posted 4 years ago #

    Hello,

    I'm looking for a plugin or some code that will enable me to only show link category that matches post category, for example:

    link category: bananas
    post category: bananas

    Only link category bananas will show on posts in bananas category

    Thanks

  2. MichaelH
    Member
    Posted 4 years ago #

    If a 'category' view, display links with same category

    <?php
    if ( is_category() ) {
    $cat = get_query_var('cat');
    $category=get_category($cat);
    wp_list_bookmarks('category_name='.$category->cat_name); } ?>
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic