-
AuthorPosts
-
February 11, 2014 at 9:14 am #222076
Hello!
I am customizing Enfold a little in my websıte. And instead of the line where you normally see the title of the page on the left and the breadcrumbs on the right, I would like to put a very simple custom menu, either via a widget or manually. The menu will be practically a submenu for the corresponding page.
Probably there’s a php code somewhere, which could be replaced with a code allowing a widget area.
Could you please help me further?
Best,
NedimFebruary 11, 2014 at 12:43 pm #222177Hi nedimhazar!
Please add this on functions.php:
add_filter('avf_title_args', 'avf_change_breadcrumb', 10, 2); function avf_change_breadcrumb($args,$id) { if($args['breadcrumb'] == true) { $args['breadcrumb'] = false; $args['title'] = ''; $args['html'] = "<div class='{class} title_container'><div class='container'>PLACE THE MENU HERE</div></div>"; } return $args; }
Add the menu inside the container div.
Best regards,
IsmaelFebruary 11, 2014 at 12:47 pm #222178Hi Ismael,
thanks for the code. However, there’s one catch. the pages (three in all) have different submenus and naturally there is also the posts page. Meaning they have to be able to change. That’s why I thought a widget area might be more appropriate.
Could you help me further?
Best
NedimFebruary 11, 2014 at 12:49 pm #222180Or the other way around, I would have to create a different page template for each one maybe?
best
nedimFebruary 11, 2014 at 2:03 pm #222226Hi!
I’m sorry but I think I need to ask the rest of the support team. Please wait for Dude’s response.
Regards,
IsmaelFebruary 12, 2014 at 8:37 am #222592Hi!
Adding a custom menu or widget area is not easily possible because it would require additional styling, additional php code, etc. and this customization is beyond the scope of our support forum. You can use Ismaels code above to change the breadcrumb and if you want to display different content on different pages use the is_page() conditional http://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page
to check the id of the current page – the code would look like:add_filter('avf_title_args', 'avf_change_breadcrumb', 10, 2); function avf_change_breadcrumb($args,$id) { if($args['breadcrumb'] == true) { $args['breadcrumb'] = false; $args['title'] = ''; $args['html'] = "<div class='{class} title_container'><div class='container'>PLACE THE DEFAULT MENU HERE</div></div>"; if(is_page(array(17,9))) $args['html'] = "<div class='{class} title_container'><div class='container'>PLACE THE MENU FOR PAGE 17 and 9 HERE</div></div>"; } return $args; }
Best regards,
PeterFebruary 12, 2014 at 1:57 pm #222767Thanks Dude!
-
AuthorPosts
- The topic ‘how can I customize the title/breadcrum area?’ is closed to new replies.