• Hello,
    I was trying to create shortcode for custom taxonomy terms dynamically. Suppose, if there is a term called “wordpress” then I should be able to query all the posts associated with that term via shortcode. Any help would be really appreciable.
    Thanks,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Here’s some code of mine. Currently, it gets only the most recent post, but if you change the number of posts_per_page from 1 to -1, you’ll get them all. (In that case, remove the code that outputs the “read more” link that takes the viewer to the category page.)

    https://github.com/sterndata/sdsplugin/blob/master/sterndata-plugin.php#L43

    Thread Starter saurav.rox

    (@sauravrox)

    Hello sterndata,
    Thank you very much for the reply. But this is not what i actually want. I was trying to query posts by term and not by category as mentioned above. Suppose if there is a taxonomy called ‘event’ and under that taxonomy there are multiple terms. So, i was trying to query posts under each of the term via shortcode of each of the term.
    Hoping for some awesome hints from you ??

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Terms shortcodes’ is closed to new replies.