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 (807)</option> <option value="187" class="level-1"> Art Event (59)</option> <strong><option selected="selected" value="18" class="level-1"> Reviews (72)</option></strong> <option value="39" class="level-1"> Videos (13)</option> <option value="206" class="level-1"> Visual Project (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. 🙁
nevermind the tag in the code up there. I was trying to bold it in the display, not thinking about the fact that adding the code tags on either end would render everything in there inert. It’s only 1:30 and already my brain is acting wonky.
- The topic ‘Categories Drop Down widget auto-selecting random (not parent) category’ is closed to new replies.