• I’m trying to see where I cant get the ID of my categories on PhpMyAdmin or somewhere else?

    The documentation tell me that I can includes the IDs…. But I can’t figure out how to get my IDs… Any ideas?

    ————————

    Include or Exclude Categories

    To sort categories alphabetically and include only the categories with IDs of 16, 3, 9 and 5, you could write the following code:

    <ul>
    <?php
    wp_list_categories('orderby=name&include=3,5,9,16'); ?>
    </ul>
Viewing 1 replies (of 1 total)
  • Thread Starter Patrice Poliquin

    (@poliquinp)

    I might find a way to GET the ID of one specific category by looking in the URL when I edit a cat.

    https://yourwebiste.com/wp-admin/categories.php?action=edit&cat_ID=3

    For exemple the category I’m editing is [3] so if I write (using the snippet above) something like this :

    <?php wp_list_categories('orderby=name&include=3'); ?>

    This code should give me only the posts with the category ID 3 right?

    But it still not working… Still working on! ??

Viewing 1 replies (of 1 total)
  • The topic ‘Where can I get my categories ID ?’ is closed to new replies.