• Resolved tiotrom

    (@tiotrom)


    I’ve been trying to display only posts from a certain category but looking at the shortcodes I cannot figure out how to. Any help? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Micah Wood

    (@wpscholar)

    @tiotrom Yes, you can definitely limit the items that will be displayed to a specific category.

    To start, use the shortcode like this:

    [random_post_on_refresh taxonomy="category" terms="2"]

    The number 2 above is going to be the ID of the category you want to display. You can find more details on how to get the ID of the category here: https://www.wpwhitesecurity.com/find-wordpress-category-id/

    I know it isn’t the most straight-forward, but the way the shortcode is designed makes it very flexible.

    • This reply was modified 4 years, 8 months ago by Micah Wood.
    Thread Starter tiotrom

    (@tiotrom)

    Oh great thank you. Maybe add this as an example to the description page. Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sort based on category’ is closed to new replies.