Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   [SOLVED] Emiting custom <ul>...</ul> menu HTML (http://forum.bytesforall.com/showthread.php?t=2449)

gesman Jul 15, 2009 10:11 AM

[SOLVED] Emiting custom <ul>...</ul> menu HTML
 
Hi there,
I want to replace standard pages menubar with my own - in particular the one that is generated by NAVT plugin - because it is so flexible.

My first idea to do it was to edit the code inside of:
Style and Edit Header Area -> Configure Header area
like this:
Code:

%image <?php if (function_exists('navt_getlist')) navt_getlist ('menu1', true); ?>
But apparently in the above spot the function 'navt_getlist' does not exist.

My second idea was to create custom widget area like this:
Code:

%image <?php bfa_widget_area('name=Horizontal menu&cells=1'); ?>
And then paste PHP executable code inside of Text widget (supported by Exec-PHP plugin) placed in above new widget area.

Second approach generates lots of extra "table" code + standard widget formatting around that I envision would be difficult to style correctly.

So my question is - what would be the cleanest way to emit custom <ul>...</ul> code right after the %image without bunch of formatting around?

Gleb

Flynn Jul 15, 2009 04:47 PM

Have you tried without function_exists

%image <?php navt_getlist ('menu1', true); ?>
That may throw an error if you deactivate the plugin but it would be interesting to see which function isn't available there. I will have to change this if plugin functions don't work there

The widget area works with tables for greater stability with side by side boxes as you probably know. I might add another option there to create these areas with CSS-only

If the header area doesn't work I can only suggest a widget area

gesman Jul 15, 2009 06:14 PM

Man, you rock!

Silly me - it *does* find it without function_exists() - so life is bright and beautiful.

Although it's still a mystery why 'function_exists' returns FALSE - but it may something to do with namespaces.

Thanks Flynn,

Gleb


All times are GMT -6. The time now is 01:03 PM.

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