• ozpoker

    (@ozpoker)


    Using K2 and sidebar modules

    I can find lots of stuff on how to exclude a categories from diff. areas and am doing that easily with wp_list_cat in header

    <?php wp_list_cats('exclude=2,3,11,12,13'); ?>

    But I am using the sidebar list module and had to create a new category for the calendar event that I’ve called “Upcoming Events”.

    How do I exclude that from the category list on the left side bar ?

    site: [url]https://www.ozpoker.net.au[/url]

Viewing 3 replies - 1 through 3 (of 3 total)
  • did you ever figure this out?

    Kinda figured this out, you have to edit widgets.php and search for categories and edit the function there

    Hi,
    Have you tried editing the functions.php file inside your themes directory? In particular you could add the following code:

    function widget_mytheme_categories() {
    ?>
    <?php wp_list_categories('exclude=5&title_li=<h2>Categories</h2>'); ?>
    <?php
    }
    if (function_exists('register_sidebar_widget') )
        register_sidebar_widget(__('Categories'), 'widget_mytheme_categories');

    Hope this helps a little.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘exclude a category from category list sidebar module ?’ is closed to new replies.