Sorry I just realized I posted my question in a “resolved thread”, please forgive the duplication.
Can you please further explain how to add the shortcode to the template when additional attributes are needed to show specific reviews, e.g. based on category?
So in your example from the other thread:
<?php echo do_shortcode(‘[RICH_REVIEWS_SHOW]’); ?>
I need to change the category attribute based on a custom field for the page that matches the category, like so:
<?php echo do_shortcode(‘[RICH_REVIEWS_SHOW category=”<?php echo $category(); ?>”]’); ?>
Obviously what I have doesn’t work…..need a little help here. 🙂
- The topic ‘Adding shortcode attributes using PHP in template’ is closed to new replies.