WordPress.org

Ready to get started?Download WordPress

Forums

Getting bulletpoints in category list (9 posts)

  1. minimac
    Member
    Posted 8 years ago #

    Ive got bullet points in all my other sidebar items, but I can't seem to get them in my category list. I've tried comparing to the other items but I'm not having any luck.

    This is an extract from Sidebar.php

    <!-- Categories -->
    <h2><?php _e('Categories'); ?></h2>

      <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

    <!-- End of Categories -->

  2. <!-- Archives -->
    <h2><?php _e('Archives'); ?></h2>

      <?php wp_get_archives('type=monthly'); ?>
  3. <!-- End of Archives -->

    I've got the

      tags in there, don't understand why it won't work though :(
  • minimac
    Member
    Posted 8 years ago #

    good ol' bump

  • kri
    Member
    Posted 8 years ago #

    You're missing one

  • tag right before this code...

    <h2>
    Categories
    </h2>

    It looks like you're using an opening li and closing li to create a few spaces after each section in your sidebar. You should be using line breaks, or even more correctly setting a margin to create this space. The li tag wasn't meant to be used as a spacer.

  • kri
    Member
    Posted 8 years ago #

    Bah, the tag you're missing is an li tag.

  • minimac
    Member
    Posted 8 years ago #

    Thanks for the reply, could you post a snippet of what my code should look like?

    Do i need to put in a <h2> or a li tag? and where?

    Many thanks

  • kri
    Member
    Posted 8 years ago #

    Look for this in your code...

    <h2>
    Categories
    </h2>

    Change it to look like this...

  • <h2>
    Categories
    </h2>
  • kri
    Member
    Posted 8 years ago #

    Rather, change it to look like this (replacing [ and ] with < and >)...

    [li]
    [h2]
    Categories
    [/h2]

  • tanster
    Member
    Posted 8 years ago #

    My sidebar code for categories looks like this:

    <h2><?php _e('Categories'); ?></h2>
    <ul>
    <?php list_cats(0, 'all', 'name', 'asc', 'index.php', 1, 0, 1, 1, 1, 1, 0,'','','','','',1); ?>
    </ul>

  • kri
    Member
    Posted 8 years ago #

    Right before all that code, add an li tag.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags