Viewing 2 replies - 1 through 2 (of 2 total)
  • If a ‘category’ view, display links with same category name

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

    This works perfectly for what I need, however, I have one question. I placed this code inside a div. How do I get the div to NOT display if there are not any bookmarks related to the category?

    In other words, if a user is on a page about X, but there are no Link/Bookmark/Blogroll categories about X – then do not display the div with wp_list_bookmarks.

    Thanks in advance for any and all assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘a blogroll for each category’ is closed to new replies.