WordPress.org

Support

Support » How-To and Troubleshooting » Categories Drop Down widget auto-selecting random (not parent) category

Categories Drop Down widget auto-selecting random (not parent) category

  • So… on my site I have a left sidebar widget installed that is the categories dropdown menu. I have a parent category – all articles – and then subcategories. I would assume that the autoselected category would be my parent category (which is the category formerly known as “uncategorized” and which I changed to “all articles”. This may be a problem, I don’t know) but it is auto-selecting “Reviews” (cat id 18) as what appears in the dropdown menu’s initial display. This means you have to select something else before you can then re-select “reviews” so that it will actually go to the “reviews” category page. This is SUPER annoying because Reviews are what our readership are most interested in! I looked at the code in firebug and it looks like this (assuming this displays correctly – I have bolded the problem area and taken out a bunch of the other dropdown options just for the sake of not having to look at a bunch of irrelevant code):

    <select class="postform" id="cat" name="cat">
    	<option value="-1">All Articles</option>
    	<option value="1" class="level-0">All Articles&nbsp;&nbsp;(807)</option>
    	<option value="187" class="level-1">&nbsp;&nbsp;&nbsp;Art Event&nbsp;&nbsp;(59)</option>
    	<strong><option selected="selected" value="18" class="level-1">&nbsp;&nbsp;&nbsp;Reviews&nbsp;&nbsp;(72)</option></strong>
    	<option value="39" class="level-1">&nbsp;&nbsp;&nbsp;Videos&nbsp;&nbsp;(13)</option>
    	<option value="206" class="level-1">&nbsp;&nbsp;&nbsp;Visual Project&nbsp;&nbsp;(2)</option>
    </select>

    So… why is there no option to set the “option selected” value? Would I have to find the code for the widget itself? I don’t know where I would find it in any of the php files for the site. I can edit the code in firebug (for pretend) and mark the All Articles category as “option selected” and that solves the problem, of course, but I don’t know where to go to actually change this programmatically.

    Any help is appreciated. I know just enough about this coding nonsense to get myself in a heap of trouble over things that are probably simple solutions. 🙁

    -Sonya

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Categories Drop Down widget auto-selecting random (not parent) category’ is closed to new replies.