Support » Themes and Templates » list_cats issue…planning on skinning the cats alive in a second

  • Resolved orange2apple

    (@orange2apple)


    Yet another issue I am sure requires only a simply fix. ATTEMPTING to exclude some categories from appearing in the sidebar. Used a plug-in that did nothing but remove the excluded category posts from the main section. And then did the following:

    <ul>
    <?php
    wp_list_categories('orderby=name&show_count=1&exclude=11, 12, 13, 14, 15'); ?>
    </ul>

    In the sidebar.php. It did nothing

    Then did:

    <div id="category"> <li class="sidebar-spacer"></li>
    <li><h2><?php _e('Categories'); ?></h2>
    <ul><?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','orderby=name&show_count=1&exclude=11, 12, 13, 14, 15','','') ?></ul>
    </li>
    </div>

    In sidebar.php. Did nothing.

    HELP?

    Fadi

Viewing 10 replies - 1 through 10 (of 10 total)
  • Cal

    (@themesbycal)

    I think you had it right the first time, but probably remove the spaces, so it looks like this

    &exclude=8,9,7,19

    Nope. That did not do it. Grrr… This makes no sense.

    Is your theme using the sidebar widgets? In that case no editing has any effect: everything that is hardcoded in your sidebar is over-written by the widgets.

    You are editing the right file? And it is not a widget in the sidebar?

    Ah…buggering hell…it is indeed a widget. All I need do is remove the widget?

    I do have this in the sidebar.php:

    <div id=”category”> <li class=”sidebar-spacer”>

  • <h2><?php _e(‘Categories’); ?></h2>
      <?php wp_list_cats(0, ”, ‘name’, ‘asc’, ”, 1, 0, 1, 1, 1, 1, 0,”,”,’exclude=11,12,13,14,15′,”,”) ?>
  • </div>

    But if I remove the widget, nothing replaces the category info. The code above does nothing.

You can’t have both: either widgets or handcoded sidebar.
You have to remove ALL the widgets to have the handcoded version displayed…

Warning: if you do that, be aware that the template tag you are using is deprecated:
http://codex.wordpress.org/Template_Tags/wp_list_cats

Ah hell….and no way to configure that widget eh?

Never mind…found a better widget..will just deal with the cats I don’t want showing, showing.

You do not have to be clairvoyant to volunteer in this forum but it certainly helps…………:)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘list_cats issue…planning on skinning the cats alive in a second’ is closed to new replies.