Title: Exclude_category bookmarks problem
Last modified: August 19, 2016

---

# Exclude_category bookmarks problem

 *  [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/)
 * Hi,
 * I have a problem using the exclude_category tag with bookmarks.
 * Here is the code I’m using:
 * `<?php wp_list_bookmarks('exclude_category=1,3,4&between=<br />&show_description
   =1') ?>`
 * Instead of excluding the 1, 3 and 4 categories, it shows all categories.
 * Any ideas what’s wrong here?

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900725)
 * Anyone?
 *  Thread Starter [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900737)
 * I looked into depth of the WordPress core and couldn’t find ‘exclude_category’
   from bookmark-template.php and bookmark.php.
 * Is it so that exclude_category isn’t coded at all to the bookmark-template.php
   in 2.5.1? From bookmark.php I found ‘exclude’ but I still have no idea how to
   make it exclude the category. If I use just exclude-tag instead of exclude_category
   it removes certain bookmarks but not bookmark categories.
 * Hmm… or is there just some typo in my code?
 *  Thread Starter [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900768)
 * Can someone who knows better confirm that exclude_category doesn’t work with 
   bookmarks? My deadline is killing me.
 * Here is the full page template I’m using. It doesn’t exclude the 1,3 and 4 categories
   but instead it just shows all the categories:
 *     ```
       <?php
       /*
       Template Name: Others
       */
       ?>
   
       <?php get_header(); ?>
   
       <table class="table" cellpadding=0 cellspacing=0 border=0>
       <tr valign=top>
       <td class="leftshade">
       &nbsp;
       </td>
       <td class="sidebar">
       <?php get_sidebar(); ?>
       </td>
       <td id="content">
   
       <div class='narrowcolumn'>
   
       <ul class="list">
       <?php wp_list_bookmarks ('exclude_category=1,3,4&between=<br />&show_description=1') ?>
       </ul>
   
       </div>
   
       </td>
       <td class="rightshade">
       &nbsp;
       </td>
       </tr>
       </table>
   
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900784)
 * Anyone?
 *  Thread Starter [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900789)
 * Come on!
 *  Thread Starter [maisteriharju](https://wordpress.org/support/users/maisteriharju/)
 * (@maisteriharju)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900791)
 * I solved it.
 * If someone else is having this same problem this is a 2.5.1 problem. I tried 
   the same template with 2.6.2 and it works fine. The “exclude_category”-tag doesn’t
   exist in bookmark-template.php of 2.5.1 but it exists in 2.6.2’s bookmark-template.
   php.
 * 2.5.1:
 *     ```
       $defaults = array(
       		'orderby' => 'name', 'order' => 'ASC',
       		'limit' => -1, 'category' => '',
       		'category_name' => '', 'hide_invisible' => 1,
       		'show_updated' => 0, 'echo' => 1,
       		'categorize' => 1, 'title_li' => __('Bookmarks'),
       		'title_before' => '<h2>', 'title_after' => '</h2>',
       		'category_orderby' => 'name', 'category_order' => 'ASC',
       		'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">',
       		'category_after' => '</li>'
       ```
   
 * 2.6.2:
 *     ```
       $defaults = array(
       		'orderby' => 'name', 'order' => 'ASC',
       		'limit' => -1, 'category' => '', 'exclude_category' => '',
       		'category_name' => '', 'hide_invisible' => 1,
       		'show_updated' => 0, 'echo' => 1,
       		'categorize' => 1, 'title_li' => __('Bookmarks'),
       		'title_before' => '<h2>', 'title_after' => '</h2>',
       		'category_orderby' => 'name', 'category_order' => 'ASC',
       		'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">',
       		'category_after' => '</li>'
       ```
   
 *  [zuberi](https://wordpress.org/support/users/zuberi/)
 * (@zuberi)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900883)
 * Hiya. It’s just unbelievable that no-one has responded to this yet! I tried importing
   the 2.6.2 code you listed above into bookmark-template.php in 2.5.1 – and i still
   can’t get it to work… (I’m not changing my blog to 2.6 ‘cos i really don’t like
   it at all…) so wondering if this actually works for you?
 *  [Burbridge](https://wordpress.org/support/users/cinemaminima/)
 * (@cinemaminima)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900941)
 * I am using WP 2.7.1 and the exclude_category parameter does not work!
 *  [Birdie](https://wordpress.org/support/users/birdie/)
 * (@birdie)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900971)
 * I’m using 2.8.3 and it doesn’t work there either. And there doesn’t seem to be
   any explanations as to why it doesn’t work. What a shame. Seems like an easy 
   thing for someone in the know to fix too.
 *  [Birdie](https://wordpress.org/support/users/birdie/)
 * (@birdie)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900973)
 * Okay just figured it out. Having a real DUH moment! But I’ll share in case it
   helps someone else.
 * I couldn’t figure out the category ID number. Looking at the admin panel for 
   Bookmark Categories, I saw the number 6, so was using that number. That was the
   number of bookmarks under that category though not the cat id.Finally figured
   that out, but couldn’t see anywhere that told me what the category ID number 
   was. Finally noticed if I clicked it the category ID displayed in the URL.
 *  [starbug72](https://wordpress.org/support/users/starbug72/)
 * (@starbug72)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900977)
 * On 2.8.4 the exclude_category does not work either. Hope this gets fixed in next
   release.
 *  [eastwoodarts](https://wordpress.org/support/users/eastwoodarts/)
 * (@eastwoodarts)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900985)
 * exclude_category doesn’t want to work in 2.8.5 either. A decent work around is
   to use a negative value for the category argument.
 * eg instead of exclude_category=44 use category=-44.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Exclude_category bookmarks problem’ is closed to new replies.

## Tags

 * [bookmarks](https://wordpress.org/support/topic-tag/bookmarks/)
 * [exclude_category](https://wordpress.org/support/topic-tag/exclude_category/)
 * [wp_list_bookmarks](https://wordpress.org/support/topic-tag/wp_list_bookmarks/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 6 participants
 * Last reply from: [eastwoodarts](https://wordpress.org/support/users/eastwoodarts/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/exclude_category-bookmarks-problem/#post-900985)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
