Support » Plugins and Hacks » Hacks » Category links in header

  • Hello,
    I am new to PHP (most of my programming is done in ASP.NET and C#) so please bear with me. I am trying to add a horizontal list of my categories in my header, but am having some issues. Currently I am using the “list_cats” function ( (which works, except I can’t change the font color in the CSS, only the font size and font family). Anyways, the list_cats function is saying it is depreciated and any of these functions ( should be used instead, but I can’t get them to work.

    (I hate being a n00b again). Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator

    Ok, that helps. So when it displays my categories, it actually says the word “Categories” above them. How do I remove that?

            <title>Tutorial theme</title>
            <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
            <div id="wrapper">
            <div id="header">
            	<div style="float:left; top:5px;">
       		    	<img src="/wp-content/themes/tutorial_theme/images/logo.png" width="405" height="210" alt="ok">
                <div style="float:right;">
                	<div id="categorylist">
    						<?php wp_list_categories( $args ); ?>
                        </div><!-- end of categorylist -->
                        <h1><a>"><?php bloginfo('name'); ?></a></h1>
                <div style="clear:both;">

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    You want the title_li attribute.

    Like this:
    wp_list_categories( array( 'title_li' => "" ) );

    You can set title_li to display any arbitrary text/html you’d like. Setting it to an empty string ( “” ) makes it disappear altogether. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category links in header’ is closed to new replies.