Moderator
James Huff
(@macmanx)
Volunteer Moderator
Offhand, I don’t see anything wrong, but I have a feeling that I’m not correctly comprehending your instructions.
Have you tested on a separate installation?
Thread Starter
esmi
(@esmi)
Tested on 2 installations using TwentyTen. If your site is set to use a static front page and you opt to run a search from (say) the Home page, the current_page_parent class is added to the main posts page. If you run a search from a sub-category, the posts page get the current_page_ancestor class.
I only spotted this because I was working on a theme that applied different background colors to current_page_parent and current_page_ancestor. In TwentyTen, you need to check the source markup.
This class application seems illogical to me. A search results page has no direct connection with the main posts page. This is especially true for those who are using WP as a CMS with perhaps only a single catgeory of news-type posts. if anything, these classes should be applied to the static front page.
It’s as if the core devs confused is_front_page with is_home, if you know what I mean…
Moderator
James Huff
(@macmanx)
Volunteer Moderator
It’s as if the core devs confused is_front_page with is_home, if you know what I mean.
Oddly enough, that makes perfect sense to me. Sounds like an easy mistake to make.
Since it’s a core theme, you should probably file a ticket in Trac.
Thread Starter
esmi
(@esmi)
I will. I was just looking for some independent confirmation first. My Trac record is about 3:0.
Moderator
James Huff
(@macmanx)
Volunteer Moderator
I’ve tested it out, and I think I see what you’re saying, but I’m just going to leave it at “I think,” because the part of my brain that interprets code is not operating at peak efficiency today.