Portfolio base page and menu change

Support Forums for LiveMesh Themes & Plugins Forums Agile Theme Support Portfolio base page and menu change

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #10003
    Morskate
    Member

    See the attached .png.

    In the admin section, i’ve specified the default portfolio page as /werk (the same as is displayed in the menu), but whne i visit the portfolio page /werk the blue bar in the menu is under /blog instead of /werk.
    Also, the base/root directory for an portfolio item is /portfolio/item-name instead of /werk/item-name.

    How do I fix this?

    #10045
    Veena
    Moderator

    1. Pls share a link to your site.

    2. Pls modify file custom-post-types.php line no:215 like below

        'rewrite' => array('slug' => 'werk'),
       
    #10052
    Morskate
    Member
    #10085
    Veena
    Moderator

    Pls remove the below line from the file main.js

    $('#primary-menu > ul > li.current_page_parent').first().addClass('active');
    
    #10096
    Morskate
    Member

    Removing it only makes the line appear under home. It should appear under ‘werk’.

    *EDIT*
    Also, this makes my individual blog post pages highlight the home menu item. So not a solution.

    #10145
    Veena
    Moderator

    Kindly share temporary login credentials as a private msg so that we will look into.
    Thanks

    #10149
    Morskate
    Member
    This reply has been marked as private.
    #10175
    Morskate
    Member

    Any change you’ve looked at this?

    #10204
    Raghavendra
    Moderator

    Sorry for the delay – Will get back to you in next few hours. My initial research says this requires a Javascript code change to avoid Home menu item being highlighted. Had been busy with a theme release.

    #10213
    Morskate
    Member

    Okay, i’m eager to learn of a solution

    #10244
    Morskate
    Member

    any news?

    #10246
    Raghavendra
    Moderator

    I am working on a solution to tweak the highlighting. You will surely hear back from us.

    #10305
    Raghavendra
    Moderator

    Sorry – this took some time since it required a bit of research and there were other things going on. Pls append the following code to your functions.php file.

    function my_page_css_class( $css_class, $page ) {
        if (is_singular('portfolio')) {
            $page_id = mo_get_theme_option('mo_default_portfolio_page');
            if ( intval($page_id) == $page->object_id ) {
                $css_class[] = 'current_page_parent';
            }
        }
        return $css_class;
    }
    add_filter( 'nav_menu_css_class', 'my_page_css_class', 10, 2 );
    

    Then set the “Werk” page as the Default Portfolio Page in the Portfolio tab of theme options. The Werk page should then get highlighted whenever you visit individual portfolio item if you have the Werk page as part of root navigation(not dropdown item) like you have now on your site.

    #10333
    Morskate
    Member

    Thank you, that works. I do have the same question concerning the individual blogs. How do i make blog underline when a visitor is on a individual blog post?

    The live site is now http://merkelijkheid.nl on which I implemented your change as well.

    #10364
    Raghavendra
    Moderator

    You can set “Posts Page” in Settings->Reading and see if the blog gets highlighted when a blog post is open. I remember this change was rolled out as part of one of the recent update to the theme.

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Portfolio base page and menu change’ is closed to new replies.