Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   montezuma and ubermenu : need to find the wp_nav_menu function call (http://forum.bytesforall.com/showthread.php?t=20022)

voodoo Mar 29, 2013 10:41 AM

montezuma and ubermenu : need to find the wp_nav_menu function call
 
Hi,

I want to use the Ubermenu (http://wpmegamenu.com/) with Montezuma... and it doesn't work fine :(.

I ask for help on the Ubermenu forum, and this is the answer :
Normally, the output of the wp_nav_menu function is immediately printed. Some themes will take this output and manipulate it via replacement functions or regular expressions. This is almost always bad practice. The proper way to manipulate the wp_nav_menu output is via the use of a custom navigation walker
UberMenu has already created all of its markup; then the theme manipulates that HTML before it is displayed. As a result, the markup is not as expected, and UberMenu styles, layouts, and functionality are likely to break.
You’ll need to find the wp_nav_menu function call and check how it its output is handled. This function is called in the header.php under normal circumstances, but you may need to do a global search on your theme files to locate it.
Look for the echo parameter being set to false and the result being captured in a variable, then manipulated, i.e.
$menu = wp_nav_menu( 'echo' => false );
$menu = str_replace( 'menu' , 'evil-menu' );
echo $menu;


So I have to remove any manipulation of the menu output variable... but I don't know how to "Look for the echo parameter"... :confused:

Someone can help me ??

Thanks, ;)
Barbara.

voodoo Mar 29, 2013 11:10 AM

ok, I delete includes/menus.php... and it seems to work ! :)

Is it a bad solution ? :p

Thanks !

Barbara.

jerryc Mar 29, 2013 11:26 AM

Quote:

Originally Posted by voodoo (Post 98784)
... and it seems to work ! :)

Is it a bad solution ?

With most coding goals, there are multiple solutions. Easy ones that work tend to score high on most people's lists.


All times are GMT -6. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.