WordPress.org

Ready to get started?Download WordPress

Forums

single_cat_title slug? (5 posts)

  1. Moldarin
    Member
    Posted 7 years ago #

    Hi,

    single_cat_title gives me the title, but how can I get only the «slug» part of the URL?

  2. Situation
    Member
    Posted 7 years ago #

    I join Moldarin in his request, even if it's 8 months old.

  3. Jonski
    Member
    Posted 7 years ago #

    I was just looking at this. If you are in a category archive, this should give you the category slug.

    $this_category = get_category($cat);
    echo $this_category->category_nicename;

  4. sharma1367
    Member
    Posted 7 years ago #

    Hi,

    I have a question on catagories. I know that the list cat shows all catagories in a list.eg. blogroll, my blogs, partners ect. If the code is placed in the sidebar all these are listed.

    What i am trying to do is from the catagoies list i would like to place say my blogs into the other sidebar on its own without the other catagories.

    how do I do this?

    Hope you can understand what I'm trying to do.

    Thanks
    Gail

  5. Jonski
    Member
    Posted 7 years ago #

    I think I understand.. I think you want wp_list_categories() to dislay the post categories, and wp_get_links() to display the links.

    http://codex.wordpress.org/Template_Tags/wp_list_categories

    http://codex.wordpress.org/Template_Tags/wp_get_links

Topic Closed

This topic has been closed to new replies.

About this Topic