ThemeShaper Forums » Thematic

[closed]

Nav menu & the author page

(7 posts)
  • Started 4 years ago by tmayo
  • Latest reply from squidz
  • This topic is not resolved
  1. tmayo
    Member

    Here's a DEV site I'm working on: http://tph.bluesphereqa.com/

    Go to Teams > Men's Elite > Tim Mayo

    Notice the navigation menu changed from Teams to Blog when you click on the author - any ideas how to get the nav menu to stay on Teams when viewing an author page?

    The menu is based on Gene's thread here: http://forums.themeshaper.com/topic/create-horizontal-dropdown-child-menu-that-holds-on-subpage

    Thanks,
    Tim

    Posted 4 years ago #
  2. Hi Tim,

    Yeah the CSS for that horizontal nav approach is based on WordPress' .current_page_item and .current_page_parent classes. WordPress is going to set the blog as a .current_page_parent of all author archives. You'll need to add CSS using the bodyclass for author archives to be more specific than the styles from the rest of the horizontal nav stylesheet. Sorry, I don't have the exact code to make this work right now; but this is the path to follow.

    -Gene

    Posted 4 years ago #
  3. tmayo
    Member

    Hi Gene,

    Thanks for the reply. I looked at the bodyclass tag in the Codex, but couldn't get it to work. Can you give me a little more info? Doesn't have to be exact code - just something to get me a little closer.

    Thanks,
    Tim

    Posted 4 years ago #
  4. you should be able to do it by adding something like

    body.author .page-item-8 {background:none;}
    body.author .page-item-16 {background:#393839;}

    Posted 4 years ago #
  5. tmayo
    Member

    Thanks Peter - I'll probably use something similar to that & add a childtheme_authormenu() in functions.php to force the submenu to show.

    Posted 4 years ago #
  6. tmayo
    Member

    Looks like that will work with any page except the blog page.

    This works: body.author .page-item-16 {background:#393839;}
    This doesn't: body.blog .page-item-8 {background:#393839;}

    Whenever I click on an author page (Teams > Men's Elite > tmayo), the SuperFish script creates these classes for the Blog menu item:
    page_item page-item-30 current_page_parent current sfHover sf-breadcrumb

    Any ideas?

    Posted 4 years ago #
  7. tmayo - did you ever resolve this issue? I have exactly the same task to conquer, but have yet to figure this out. Any insights?

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.