• Resolved tsmulugeta

    (@tsmulugeta)


    Hi,

    I love your plugin. I’m looking forward to the release of your Pro version.

    I wanted to change the location of the Star form. So I disabled it in settings, and then added it to my posts template using this statement:

    <?php echo do_shortcode('[ratemypost]'); ?>

    Is there a way to add a conditional to this statement? Like if enabled for all posts, echo do_shortcode(‘[ratemypost]’)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi @tsmulugeta,

    in this case you would do something like this:

    
    if( class_exists( 'Rate_My_Post' ) ) {
        $options = get_option( 'rmp_options' );
        if( $options['posts'] == 2 ) {
          echo do_shortcode('[ratemypost]');
        }
      }
    

    Regards,
    Blaz

    Thread Starter tsmulugeta

    (@tsmulugeta)

    Thanks Blaz for your help!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add template conditional statement’ is closed to new replies.