• I’m creating a custom WP theme and with the help of you good people out there sharing your knowledge with others on these forums, I’ve been able to use CSS to highlight the parent and ancestor pages in my main navigation.

    The problem I am having is that when the search function is used or the 404 page is displayed, it thinks my blog page is the parent so it highlights that in my main navigation. I’d like not to have anything highlighted in my main navigation for these two pages.

    I’m assuming there’s a function I can add to prevent this from happening with the search an 404 pages but I can’t find any help on the matter. Any suggestions?

  • The topic ‘Removing current page parent link from main nav for search and 404 pages’ is closed to new replies.