Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So I have a Custom Post Type setup and running with no issue. I also have a WordPress menu object as my primary navigation. I added my Custom Post to the main menu and when I click on to the landing page the correct menu item is highlighted. When I however click into an individual custom post, the "Blog" menu item is highlighted.

Anyone got any idea as to what the frick is going on?

Thanks, Ed

share|improve this question
add comment

2 Answers

I'm just shooting in the dark here, but what i think is going on is your menu "thinks" its on the blog page when its really on the "CPT" page? is that about right? if so then you need to select a blog page in the admin section. Under the Settings menu click on the "Reading" sub menu. There you will find two select boxes. I'd suggest you select a specific page for your home page and your blog page. see if that corrects the issue.

I'm not even in the right ball park, please let me know.

share|improve this answer
    
I already tried that Steve - it didn't work. You've nailed exactly what the issue is though. I'll keep playing around with it. –  Ed Bloom Aug 20 '11 at 16:03
add comment

i eventually managed to track down what's going on here and have worked around it for the moment until I find a permanent solution.

as @Steve Fischer had suspected the menu thinks it's on the blog page while it is in fact on a CPT page. What exactly is happening is that the class "current_page_parent" is being appended to my Blog menu link on CPT details pages.

e.g.

mysite.com/custom-post-menu-link/ - all good - my separate Blog menu link doesn't get the current_page_parent class.

mysite.com/custom-post-menu-link/my-custom-post - my separate Blog menu link gets the current_page_parent class.

For now I just removed my selector rules for .current_page_parent but this isn't a permanent solve - it at least stops the Blog menu link being highlighted incorrectly.

Are CPT pages technically children of Blogs? If so, this seems to be an issue for people in my situation.

Ed

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.