WordPress.org

Ready to get started?Download WordPress

Forums

Getting wp_list_categories to NOT print the category title (3 posts)

  1. heriz
    Member
    Posted 5 years ago #

    (Very sorry, forgot to use the code thing in the last version of this post)

    I'm using CSS to replace <li><a> elements with a background image.

    I need there to be nothing inbetween <a></a> tags, so that only the image can be seen.

    Is this possible using wp_list_categories? I can't see any arguments on http://codex.wordpress.org/Template_Tags/wp_list_categories that might do this.

    Thanks in advance...

  2. heriz
    Member
    Posted 5 years ago #

    No-one? If not I just won't create the list dynamically I guess.

  3. grostoryeu
    Member
    Posted 4 years ago #

    I'm also editing my <li> with CSS.

    Strangly enough, it works good for me with this :
    <?php wp_list_categories('show_count=1&title_li=</h2>'); ?>

    If I put <h2></h2>, I have an unwanted top margin.
    If I remove the </h2>, my background image doesn't appear...

    Hope it helps.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.