Conditional Shortcode
-
Is there any way to modify the output of the shortcode based upon either the underlying category of a blog post or the URL of the page.
For example, if I have two blog categories: Apples and Oranges, and I’ve setup my permalinks so the URL is domain.com/apples/post and domain.com/oranges/post . . .
I’d like to use the same shortcode, but if it’s an apples post display one piece of html (image/link) and if it’s oranges display another.
In my specific situation, having two separate shortcodes won’t work due to how these posts are being created.
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Conditional Shortcode’ is closed to new replies.