Support » Fixing WordPress » 2 category widgets – can posts be added to one or the other?

  • Hi,

    Am new to wordpress…added the 2 category 1 and category 2 widgets to the sidebar and configured each to different names.

    How do I add a post to just one or the other?

    When I write a new post or manage one by editing the names of the 2 category widgets do not show up to list the post under. Is this possible to do?

    I was wanting this:
    category name and have a listing of articles under here
    category name 2 and have a listing of questions under here

    What is the best way to do this?

Viewing 15 replies - 1 through 15 (of 24 total)
  • not sure I totally understand your question …
    are you assigning posts to categories when you write them?

    That is done on the right hand side, second bar down I think.


    I added the widgets category 1 and category 2 under presentation/widgets to the sidebar and edited each for different names.

    When I add a “post” it adds the same post to both of the category 1 and category 2 categories that have different names.

    I have tried and tried but there is not a way to remove a post from either of the categories without removing it from both.

    Can this be done?

    This is the problem site:

    The same listings are in both the category widgets.

    Anyone know if you can have 2 category widgets with different posts in each one?



    Automattic Happiness Engineer

    I’m wondering about this also. I can’t seem to get different categories into different category widgets. If I put two category widgets into my sidebar, both of them have the same categories listed.

    I’m having a similar problem. I’m trying to add a text box to allow me to use the ‘exclude’ parameter, but I can only seem to get it to populate the database for my Category 2 widget (I’ve got Category 1, 2, and 3). I’ve been poking around in the wp_widgets_category_control function but can’t seem to make it work. Any help would be appreciated.




    hmmm, bump!

    Same issue here. Any resolution so far?

    Just so there is no confusion–using the widget called Categories 1 does not mean that widget will display only the Category that is ID 1. Also, the Category Widget in not designed to display posts–it displays a link to that Category, which in turn will display the posts in that Category.

    If you want to show only a specific Category or set of Categories via a Widget then please consider downloading and installing Otto’s execphp widget. Then in the widget you will need to use the proper code to display your selected categories using the template tag, wp_list_categories().

    If anyone else does this and has the exact code we need, I will be your friend forever if you post the code here. php still makes me feel kinda dumb.

    This code in Otto’s execPHP widget will display Category 5 with the count of posts for that category.

    wp_list_categories('show_count=1&include=5&title_li='); ?>

    I tried this method. So far – so good, except: I can’t get rid of the word “categories” within my list.

    I used this code in the PHP widget window:

    wp_list_categories('show_count=0&include=1,4title_ul='); ?>

    I titled it “RV Destinations” and it’s in the upper left hand column:

    Any ideas how the heck to get rid of the word “categories”?

    I have been trying to do something similar in a completely different way, being sub-categories. It is easy to make subcategories, so in this case there would be a category “articles” and a category “questions” and all the rest are sub-categories. My problem is -though- that the widget that I use just puts everything under eachother, whether category or subcategory. If this problem is solved, I think Modom’s problem is solved as well, easily.

    your code must be like this,
    wp_list_categories(‘show_count=0&include=1,4title_li=’); ?
    you must change “title_ul” to “title_li”

    Hmmm… I changed it to “ul” because I wanted it to be formatted as a “ul”…. guess I’ll have to think about this…


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    zgirl: That’s not how those options work. They are just named parameters. The name of the parameter is arbitrary, they don’t control anything by changing the name.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘2 category widgets – can posts be added to one or the other?’ is closed to new replies.