I have a PHP template file that requires some Visual Composer shortcode to be added. I only want the shortcode to display if a post belongs to certain categories. At any one time, at least three child categories will be chosen for the post.
How can I use echo do_shortcode
to fire only when these categories are selected? What I want is a specific shortcode to be added to the content when the post is in a certain category. Ideally, it will get stripped when the user selects another category that isn't in the series. I'd add it as a div within the template file.