Support » Plugins and Hacks » Rich Reviews » Possible to insert into page layout via php?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mojtaba

    (@mojtaba-taheri)


    Yes it is possible. You can insert shortcode into php by echo do_shortcode('[your-shortcode]');
    for example:
    <?php echo do_shortcode('[RICH_REVIEWS_SHOW]'); ?>

    great, thanks for the reply!

    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 above:
    <?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. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to insert into page layout via php?’ is closed to new replies.