WordPress.org

Forums

[resolved] wp_list_categories permalinks (3 posts)

  1. remittancegirl
    Member
    Posted 5 years ago #

    I've designed an alternate archives.php page that uses the function

    wp_list_categories

    But in order to exclude or include the categories I want listed, I have to use category ID. for example:

    <ul>
    <?php
    wp_list_categories('orderby=name&include=3,5,9,16'); ?>
    </ul>

    I'm assuming the category ID number is the number it would be given normally, but I've switched to permalinks, and can't figure out what the category number is. Is there anyway that I can get it to include or exclude by category name now? or slug?

    Any advice would be very helpful. Thank you.

    P.S. I'm just teaching myself php, and I'm not very good at it, so please treat me like an idiot when you explain the solution to this, if you have one.

  2. XSK8
    Member
    Posted 5 years ago #

    Hi, you'll find the ID of the Cats in the admin --> Posts --> Categorys
    Just mouseover the edit link and look at the statusbar of the browser.
    No need for names even if you use permalinks.

  3. remittancegirl
    Member
    Posted 5 years ago #

    Oh, thank you so much. I feel like such an idiot.

    Many, many, many thanks.

    Hugs,

    RG

Topic Closed

This topic has been closed to new replies.

About this Topic