Support Forums for LiveMesh Themes & Plugins › Forums › Agile Theme Support › Portfolio base page and menu change
- This topic has 15 replies, 3 voices, and was last updated 9 years ago by
Morskate.
-
AuthorPosts
-
October 22, 2014 at 1:18 pm #10003
Morskate
MemberSee 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?
Attachments:
You must be logged in to access attached files.
October 23, 2014 at 1:18 pm #10045Veena
Moderator1. Pls share a link to your site.
2. Pls modify file custom-post-types.php line no:215 like below
'rewrite' => array('slug' => 'werk'),
October 23, 2014 at 1:51 pm #10052October 24, 2014 at 3:15 pm #10085Veena
ModeratorPls remove the below line from the file main.js
$('#primary-menu > ul > li.current_page_parent').first().addClass('active');
October 24, 2014 at 4:24 pm #10096Morskate
MemberRemoving 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.October 27, 2014 at 2:59 pm #10145Veena
ModeratorKindly share temporary login credentials as a private msg so that we will look into.
ThanksOctober 27, 2014 at 3:39 pm #10149Morskate
MemberThis reply has been marked as private.October 29, 2014 at 11:11 am #10175Morskate
MemberAny change you’ve looked at this?
October 30, 2014 at 11:35 am #10204Raghavendra
ModeratorSorry 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.
October 30, 2014 at 1:32 pm #10213Morskate
MemberOkay, i’m eager to learn of a solution
October 31, 2014 at 10:45 am #10244Morskate
Memberany news?
October 31, 2014 at 1:41 pm #10246Raghavendra
ModeratorI am working on a solution to tweak the highlighting. You will surely hear back from us.
November 4, 2014 at 6:27 am #10305Raghavendra
ModeratorSorry – 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.
November 6, 2014 at 1:14 pm #10333Morskate
MemberThank 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.
November 8, 2014 at 9:28 am #10364Raghavendra
ModeratorYou 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.
-
AuthorPosts
- The topic ‘Portfolio base page and menu change’ is closed to new replies.