• Resolved maddaze

    (@maddaze)


    In the description of the gallery shortcode parameters is the following;

    categories: comma separated list of category names, slugs, or IDs (recommended to use IDs as they don’t change)

    Where do I find the category slugs and IDs?

    Harvey

Viewing 1 replies (of 1 total)
  • Plugin Author Codeer

    (@codeer)

    Right now, to retrieve a HappyFiles category slug/ID you have to inspect the source code, as you can see in the following screenshot: https://happyfiles.io/wp-content/uploads/2020/10/how-to-inspect-category-slug-id.jpg

    You can see that I am searching for the “Animals” string in my source code. Which reveals the correct

    • tag. The “data-term-id” is the category ID. In my example the category ID is 549. And the slug is the
    • class name “animals”. But the slug changes every time you change the category name, so it’s best to always use the category ID, as it never changes.

      I am looking into a better way of accessing the category ID. I tried showing it as a title for each category in the HappyFiles sidebar. So it appears on hover. Which turned out to be a bit too intrusive as most people don’t retrieve the ID very often.

      If you’ve got any idea how to show the category ID, I am all ears.

      Best,
      Thomas

Viewing 1 replies (of 1 total)
  • The topic ‘Explantion of shortcode parameters’ is closed to new replies.