Some php assistance needed


Author Message
Per Olav

Posted: 11/3/2009
Quote message 

Hi.

I'm following a tutorial of how to add a "Category" navbar just below the Artisteer standard nav bar. The new bar is positioned according to the tutorial but instead of calling the categories the plain text of the function is displayed.

This is the DIV inserted at the bottom of the header.php :

<div id="header3">
<ul class="nav2">
?php wp_list_categories('title_li'='orderby=ID'); ?</ul>
</div>

Any help of locating the failure when converting the tutorial's "ampersand" command to plain text is most apreciated.
--
Per Olav
 
Bud

Posted: 11/3/2009
Quote message 

It looks like you forgot the <> before and after your php statement.

Should be...

<?php wp_list_categories('title_li'='orderby=ID'); ?>


Not...

?php wp_list_categories('title_li'='orderby=ID'); ?


Bud
 
Per Olav

Posted: 11/3/2009
Quote message 

Quote Bud:

It looks like you forgot the <> before and after your php statement.

Should be...

<?php wp_list_categories('title_li'='orderby=ID'); ?>


Not...

?php wp_list_categories('title_li'='orderby=ID'); ?


Bud


Done - and changed 'title_li' = 'orderby=ID' to 'title_li = orderby=ID' due to error message [syntax error '=' ] . Now the the widget header text [Categories] is visible on the nav bar but the categories themselves do not show .


 
Bud

Posted: 11/3/2009
Quote message 

By default the categories have to have posts in them to show up (hide_empty=1).

Try this to show empty categories...


<?php wp_list_categories('title_li=&orderby=ID&hide_empty=0'); ?>


The "&" is used to separate parameters. Check out the WP codex for all the parameters...

http://codex.wordpress.org/Template_Tags/wp_list_categories

Bud
budstechshed.com
 
Per Olav

Posted: 11/3/2009
Quote message 

Just like a dream :)

Now a litte bit css styling and then Voila! O:)

Thanks Bud.

( PS: I used the "&-codes" back in the Stone age but they "disapeared" with the new WYSIWYG stuff ;-) )
 
Garry

Posted: 11/3/2009
Quote message 

You can have an idea of css styling from "art-nav" and "art.menu" styling rule from your style.css which control rendering of your navigation menu.
 
Per Olav

Posted: 11/3/2009
Quote message 

Quote Garry:

You can have an idea of css styling from "art-nav" and "art.menu" styling rule from your style.css which control rendering of your navigation menu.

Thanks Garry.

You guys are the very best
:-)

po
 

Reply


NAME *
EMAIL
SMILIES :-) :( :-D 8-) :*) :-/ :-{} :-X :-O :-@ O:) :-P :-< :-( :-| ;-) 
CODES [Quote] [B] [I] [U] [Code] [IMG] 
BODY *  
VALIDATION *