WordPress.org

Ready to get started?Download WordPress

Forums

Rich Reviews
[resolved] Possible to insert into page layout via php? (4 posts)

  1. Leosk8ter
    Member
    Posted 1 year ago #

    Hi,
    I'm currently using a custom post type and wanted to know if it was possible to insert this plugin into that layout via php.

    Thanks!

    http://wordpress.org/extend/plugins/rich-reviews/

  2. Mojtaba
    Member
    Posted 1 year ago #

    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]'); ?>

  3. Leosk8ter
    Member
    Posted 1 year ago #

    great, thanks for the reply!

  4. TrishaM
    Member
    Posted 10 months ago #

    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. :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.