Okay
  Public Ticket #641059
Portfolio: set parent on portfolio items
Closed

Comments

  • Max started the conversation

    Hi there,

    is there a way to set the parent of portfolio items to be a portfolio page? Once I select one of the items, the single portfolio item page is opened, but the portfolio menu entry is no longer highlighted in the main menu. This can easily be reproduced with your live demo page: http://themes.uxbarn.com/wp/thine/portfolio/car-body-design/ (notice how "Works" is not highlighted, users might think they have left the navigation hierarchy of the site).

    Can this be fixed with the current version of the theme, or does this require an update?

    Thanks a lot in advance,

    Max.

  •  291
    Paul replied

    Hi Max,

    Since they are the \"single post\", WordPress actually do not know which menu is their parent unless you also put them into the menu. It is the default behavior of WP.

    For example:

    Home
    Portfolio
       - Item 1
       - Item 2
       - Item 3
    About
    Contact

    If you create the menu like this and open the \"Item 2\" single page, then WP can know which menu to highlight as active (in this case it is \"Portfolio\").

    But, you can also use this workaround to manually set the color for your portfolio menu:

    body.single-uxbarn_portfolio #menu-item-201 > a {
        color: #e13a3a;
    }

    Note that the \"#menu-item-201\" is the \"Works\" menu item from the demo site. You need to change this to your menu item\'s ID. You can use Developer Tools on Chrome to inspect the elements to find their classes and IDs.

    Regards,
    Paul

  • Max replied

    Nice, thanks again for the quick fix!