WordPress.org

Ready to get started?Download WordPress

Forums

Get Categories with commas, not as a list (7 posts)

  1. Drew
    Member
    Posted 9 years ago #

    My website is at http://www.dev-news.com

    What is wrong is, look at the right hand area. in the side navigation area. theres a thing called "Organized Mayhem", also known as my categories.

    They are bullets, or a "list", unordered list to be exact. How would i be able to, instead having them in a list, have then separated by commas. This isnt the same as "filed under:..." . This should be ALL the categories that excist on the site.

    So how do i create commas separated by each category? is this possible?

  2. Kafkaesqui

    Posted 9 years ago #

    You can pass the template tag you're using to display categories (either list_cats() or wp_list_cats()) a parameter that will remove the list, but this instead inserts break tags (<br />) at the end of each line. Forcing commas would require either editing the source or coding up something new.

    In any case, info on the tags:
    http://codex.wordpress.org/Template_Tags/list_cats
    http://codex.wordpress.org/Template_Tags/wp_list_cats

  3. sevenupcan
    Member
    Posted 9 years ago #

    Actually I beleive there is a tag that will allow you to list the categories like breadcrums, expcept instead of using > ust a comma. Just not sure where abouts on the Codex it mentions that.

    Otherwise if all else fails you could remove the line break element and use some css to add a comma to the end of each list item except the last.

    You can find how to do this here, again replace the > with a comma. http://css.maxdesign.com.au/listamatic/horizontal33.htm

  4. Drew
    Member
    Posted 9 years ago #

    Kafkaesqui > yea i see what you mean. i dont have a bunch of php knowledge, so i dont know how ill go about doing that.

    sevenupcan > you have my question wrong. yeah i know how you do the comma replacement for a "breadcrumbs like" effect. thats where it is usually found "filed under" and i know how to do this and its covered more than enough in the forums and support. but what im trying to do is have all my categories listed using a comma instead of it outputing a list.

    if anyone has any way to do this, please let me know.

  5. maggie
    Member
    Posted 9 years ago #

    Hi,
    I think this is what you need!?
    http://codex.wordpress.org/Separating_Categories

    Maggie

  6. Drew
    Member
    Posted 9 years ago #

    nope, sory maggie. this is the same thing that sevenupcan was talking about. that is usually found in "filed under" and you can change the way they appear.

    what im trying to do is display all categories on the right side of the website. and i want them to display as text separated by commas, not as a list. thanks for trying though.

    anyone else think they can help, please?

  7. MrM
    Member
    Posted 9 years ago #

    Check the following link out:

    http://txfx.net/2004/07/22/wordpress-conversational-categories/

    Should do what you want and it's pretty easy to install as well.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags