WordPress.org

Ready to get started?Download WordPress

Forums

a blogroll for each category (3 posts)

  1. Marcomail
    Member
    Posted 5 years ago #

    Do you know if exist any plugin for associate a blogroll in a specific category ?

  2. MichaelH
    Member
    Posted 4 years ago #

    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); } ?>
    }
    ?>
  3. andytford
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.