WordPress.org

Ready to get started?Download WordPress

Forums

Limit Categories in Widget Dropdown (2 posts)

  1. SueV
    Member
    Posted 4 months ago #

    I'd like to limit the categories visible in the category dropdown that goes in widgets. I understand that I have to tell wp to limit the list by category ID, and I found this on a blog post:

    <?php wp_list_categories('orderby=name&include=#,#,#'); ?>

    and the article said to put it in a text widget, but nothing shows. I tried it with and without unordered list tags as well, no luck.

    The site is on MAMP on my mac, so no URL listed here. I'm newish to php, willing to edit the child theme, but have hit a wall with where to go next. Any help is welcome!

  2. DJDoubleXL189
    Member
    Posted 4 months ago #

    You'll need to have a plugin that supports PHP in your widgets...

    Try:
    http://wordpress.org/plugins/php-code-widget/

Reply

You must log in to post.

About this Topic