- This topic has 2 replies, 2 voices, and was last updated 16 years, 7 months ago by Anonymous.
-
AuthorPosts
-
April 25, 2008 at 1:34 am #79AnonymousMember
Ryan,
I love the suckerfish drop-down menu plug-in. I have the latest version instaled. One question: Is there a way to exclude certain categories from the category drop-down?
April 25, 2008 at 1:36 am #2345imported_RyanMemberSomeone else asked this question a while back, so I’ve just copy and paste my response below. These answers were for the old version of the plugin which used different functions for displaying different content in the dropdowns (rather than via the admin panel as per the current version). But the process is still the same. Each version creates different content for the menu, with a little lateral thinking you can work out how to do different combintations, however if you find the PHP is too confusing, then just let me know what you want to appear in your menu and I’ll provide the code to suit:
– ORIGINAL ANSWER –
Here are the raw codes you need to display the dropdowns without category number 10. You can edit the bit which says &exclude=10 to change which category is excluded from the dropdown and adding (for example) &exclude=3 after the first will remove category 3 as well.This is the raw php code, so you don’t need to use the functions with these, ie: this replaces the <?php suckerfish(); ?> code. Each of the codes below are labelled with their corresponding suckerfish function.
If you have any troubles, the code doesn’t work (I haven’t tested it) or my explanation is confusing then post back here and I’ll see what I can do to help.
[code:1i2dbmpp]suckerfish()
<?php echo ‘
<ul id="suckerfishnav">
<li><a href="’ , bloginfo(‘url’) , ‘/">Home</a></li>
<li><a href="#">Pages</a>
<ul>’ , wp_list_pages(‘title_li=’) , ‘</ul>
</li>
<li><a href="#">Archives</a>
<ul>’ , wp_get_archives() , ‘</ul>
</li>
<li><a href="#">Categories</a>
<ul>’ , wp_list_categories(‘title_li=&exclude=10’) , ‘</ul>
</li>
<li><a href="#">Blogroll</a>
<ul>’ , wp_list_bookmarks(‘title_li=&categorize=0’) , ‘</ul>
</li>
</ul>’;
?>[/code:1i2dbmpp]suckerfish1()
[code:1i2dbmpp]<?php echo ‘
<ul id="suckerfishnav">’ , wp_list_pages(‘title_li=’) , ‘</ul>’;
?>[/code:1i2dbmpp]suckerfish2()
[code:1i2dbmpp]<?php echo ‘
<ul id="suckerfishnav">
<li><a href="’ , bloginfo(‘url’) , ‘/">Home</a></li>
‘ , wp_list_pages(‘title_li=’) , ‘
</ul>’;
?>[/code:1i2dbmpp]suckerfish3()
[code:1i2dbmpp]<?php echo ‘
<ul id="suckerfishnav">
<li><a href="#">Pages</a>
<ul>’ , wp_list_pages(‘title_li=’) , ‘</ul>
</li>
<li><a href="#">Archives</a>
<ul>’ , wp_get_archives() , ‘</ul>
</li>
<li><a href="#">Categories</a>
<ul>’ , wp_list_categories(‘title_li=&exclude=10’) , ‘</ul>
</li>
<li><a href="#">Blogroll</a>
<ul>’ , wp_list_bookmarks(‘title_li=&categorize=0’) , ‘</ul>
</li>
</ul>’;
?>[/code:1i2dbmpp]suckerfish4()
[code:1i2dbmpp]<?php echo ‘
<ul id="suckerfishnav">
‘ , wp_list_pages(‘title_li=’) , ‘
<li><a href="#">Archives</a>
<ul>’ , wp_get_archives() , ‘</ul>
</li>
<li><a href="#">Categories</a>
<ul>’ , wp_list_categories(‘title_li=&exclude=10’) , ‘</ul>
</li>
</ul>’;
?>[/code:1i2dbmpp]suckerfish5()
[code:1i2dbmpp]<?php echo ‘
<ul id="suckerfishnav">
<li><a href="’ , bloginfo(‘url’) , ‘/">Home</a></li>
‘ , wp_list_pages(‘title_li=’) , ‘
<li><a href="#">Archives</a>
<ul>’ , wp_get_archives() , ‘</ul>
</li>
<li><a href="#">Categories</a>
<ul>’ , wp_list_categories(‘title_li=&exclude=10’) , ‘</ul>
</li>
</ul>’;
?>[/code:1i2dbmpp]April 25, 2008 at 6:26 am #2346AnonymousMemberThis is late, but thank you. That was helpful. Suckerfish rocks.
-
AuthorPosts
- You must be logged in to reply to this topic.