• I’ve been searching the internet and this website as well for possible solution in changing the style in the wp_list_categories but failed.

    I already seen the removing all styles on wp_list_categories but no changing the li to ».

    Where can I find the code? I tried the category-template.php but it just won’t change the li.

    thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • If you ask a theme related display question… it would be wise to provide a link, to name your theme etc.

    Otherwise, nobody can really answer your question.

    Thread Starter darksen

    (@darksen)

    to make my question clearer.

    In my sidebar.php of a theme I use the below code to list category :

    <?php wp_list_categories(‘show_count=1&title_li=’); ?>

    the output is something like

    . Category 1
    . Category 2

    What I want is to change the . or <LI> tag to >>
    my search for solution lead me to the code below but all it does is to totally remove the style .

    • tag.
    • <?php wp_list_categories(‘show_count=1&style=0&title_li=’); ?>

      Again my question is how to change LI tag to >> before all the categories.

    Sounds like you are asking a question about how to style the LI tag in CSS so that it looks like what you want. There is a nice article about doing just that on A List Apart

    Something like this is your style.css, perhaps?

    #custom-gen ul li:before {
    	content: "0BB 020";
    	}
    Thread Starter darksen

    (@darksen)

    thank you for the help n4th4n. the code you mentioned does not do the job.

    For the meantime I used image >> with code on css like this:

    ‘#newsidebar li {
    list-style-image: url(‘images/dblarrow.jpg’);
    }’

    incase other guys out there who successfully replaced li to >> please post your css code. thanks

    The code n4th4n gave you is working in the default theme. Just take a closer look at its stylesheet.

    darksen,

    As moshu mentioned it’s a bit hard to provide advice without seeing the code you’re currently working with.

    n4th4n’s code should result in a list with the » marker instead of a filled circle.

    Are you looking to remove the list all together?

    It sounds like you just want the categories to display like this:

    » cat 1 » cat2 » cat 3

    is that correct?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changing li to » in wp_list_categories’ is closed to new replies.