WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Exclude category from the menu! (3 posts)

  1. MrDanielson
    Member
    Posted 4 years ago #

    Hey people!

    I downloaded the template ThrillingTheme, and in the menu there is listed the categories.

    I've tried to do a "&limit=7" in the menu code, but it didnt change anything - it's still all categories showing.

    After that I've tried exclude&7 (category ID 7), but it just didnt exclude it.

    What did I do wrong?

    Help me please. :-)

    The code:

    <ul id="nav" class="grid_15">
    
    			<?php include(TEMPLATEPATH . '/includes/version.php'); ?>
    
    			<?php wp_list_categories('title_li=&exclude=7&orderby=count&order=DESC&limit=7') ?>
    
                <li>&nbsp;</li>
    
    		</ul>
  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    there is no parameter 'limit' - the parameter to set the number of categories shown is 'number'

    number
    (integer) Sets the number of Categories to display. This causes the SQL LIMIT value to be defined. Default to no LIMIT.

    http://codex.wordpress.org/Template_Tags/wp_list_categories
    there is a possibility that the wrong parameter disturbed the other parameters as well;

    try again with this code:

    <?php wp_list_categories('title_li=&exclude=7&orderby=count&order=DESC&number=7') ?>
  3. MrDanielson
    Member
    Posted 4 years ago #

    Thanks for the help dude! :)

Topic Closed

This topic has been closed to new replies.

About this Topic