Categories widget not working

  • Author
  • #599530


    The categories widget is working on inside pages, but not on the home page.


    Any tips on on what to look for to resolve this issue?


    The blog I need help with is



    I’m sorry but that blog is not a free blog from and being free hosted by wordpress.COM so we cannot help you with it. WordPress.COM blogs and installs operate on different code. The correct support forum to get support for that blog is here > http://wordpress.ORG/support

    For more clarity please read the sticky post at the head of this forum or the summary provided by Staff in the support documentation.
    For more on the difference:



    Actually, it IS on

    What makes you think it isn’t?



    The category pulldown on the main page is working for me.

    Just FYI, you are not allowed to hide the standard footer information here at wordpress.COM, and you risk having your blog suspended if you do.



    The footer links are missing. Here at we are not allowed to hide or remove the footer link to the theme designer and the link to via CSS editing.

    Also the dropdown on my navigation bar only works sporadically so I could not click Blog Info and determine that it was a blog. In any event I apologize.

    The bottom line here is you need to go to Staff >



    Please ignore my bottom line statement above as the categories on your front and on internal pages are working for me. I’m using Firefox 3.6.16. Please try this troubleshooting:

    If that doesn’t work then please tell us which browser and version of it you are using.



    Thank you so much for the heads-up about the colophon links! I returned them immediately!

    We saw this problem with Firefox 4 RC, Safari 5.04, and IE 8 (including fully reset browsers) and will check others. I was flummoxed because the drop-down worked in one setting and not another.

    I’ll keep investigating and report back here.



    I think I have a lead.

    In order to provide a different set of widgets on our home page and on the inside pages, we hid the Coraline theme’s Feature widgets on home and hid the Primary/Secondary widgets on others, based on body classes.

    My experience is that most widgets can be used multiple times on one page, which, in essence, is what we’re doing.

    However, I did a W3C validation which indicated a duplicated ID. Perhaps the Categories widget can’t be used twice? This issue does not appear with any other multiple widgets.

    Is this a known issue? Is there anything that can be done by end-users to resolve the issue?


    Put a couple of them into the sidebar and take a look at the source code. I would think they would have unique IDs, but then again since they are identical duplicates, perhaps not.

    I looked in Safari 5.0.4 and saw then one on the home page just fine, but here lately I’ve had a couple instances where people were seeing something messed up with 5.0.4 and I was not with the same version of the browser. Perhaps I’m blessed, or my copy of Safari is blessed.

    Of course with computer, who can say?



    The Search and Categories widgets both appear twice on each page (one of each hidden by CSS) and, as you can see below, they use the same ID, which defeats validation.

    The other widgets, however, are fine.

    I wonder if there is any way to resolve this?


    I certainly can’t think of any since they have identical IDs.



    At one point, I remember discussion about allowing multiple instances of widgets by providing different IDs, but I haven’t been able to find reference to that.

    Am I searching for the wrong terms, or are these two widgets permanently restricted to one instance only?


    Let me do some playing around here. I was looking at the source code on your site and I might have an idea.


    I was a little confused, but I think I got it straight what you want.

    I just activated Coraline on one of my test blogs, added some widgets, and except for the “meta” widget, all widget types end up with a unique ID. See example below.

    <li id=”categories-10″…
    <li id=”linkcat-24632793″…
    <li id=”text-3″…
    <li id=”archives-3″…

    So, if you wanted only the categories and text widget to show on a page, you would use target the specific page ID and then do a display none for the widgets you did not want to show on that page as below (example page ID 3).

    .page-id-3 #linkcat-24632793, .page-id-3 #archives-3 {

    If on page with id 4 you only wanted the categories and archives to show, then you would do this.

    .page-id-4 #linkcat-24632793, .page-id-4 #text-3 {

    For the home page, you would use something like this.

    .home #linkcat-24632793, .home #text-3 {

    Do note that with categories widgets, since they show exactly the same thing, there is no reason to have multiples. With the links widget, you can have multiples since you can in the widget itself set it to only show the links under certain categories.


    I forgot a backtick on that last bit of code.

    .home #linkcat-24632793, .home #text-3 {

    I just thought of something. You could have multiples of category widgets if say you wanted the one on the home page to be a dropdown list, and the on on other pages to by the full list (not dropdown). Then you could use two and target them as you wanted.



    Unfortunately, it’s the form elements in the Search and Categories widgets that have the duplicated IDs …

    ‘<input type=”submit” id=”searchsubmit” value=”Search” />’
    ‘<select name=’cat’ id=’cat’ class=’postform’ >’

    … so, no matter whether I show or hide in CSS, the HTML doesn’t validate.

    I think the only real solution would be if the widgets generated classes rather than IDs for the form elements. Then, they could be styled individually without validation problems.

    And, you are right that I could use the full category list. It’s just very long ;)

    In the meantime, I’ve thought of another work around. I am using one set of widgets on the home page right column and a different set on inside pages because I wanted to not show recent posts on the home page (that would be duplicative).

    However, I’m willing to have the exact same right column show up in both places. So, I can use the secondary area throughout and leave out the feature/crown altogether.

    Not the best solution, but it works. Since I’ve been able to do EVERYTHING else I’ve wanted with .COM hosting, that’s only a small price to pay.

    Thank you, @thesacredpath, for taking the time to engage on this somewhat subtle issue. You prompted me to think through multiple solutions. That is one reason I am a WordPress evangelist: the community!




    Classes style a “class” of elements. IDs style individual elements.

    I guess I’m not understanding where the issue is.


    You are welcome by the way although I was not able to be of much help.



    IDs and classes can both be used on any element, but whereas a class can be used with a number of elements, an ID can’t be repeated twice in one file.

    Since IDs are generated to style form elements within the Search and Categories widgets, they can only be used once on a page; having two ID instances breaks W3C validation and also messes us JavaScript, which is why the drop-downs were working inconsistently on the second instance.

The topic ‘Categories widget not working’ is closed to new replies.