• Resolved kdmitchell27

    (@kdmitchell27)


    I want to enable the option Hide Description & Total Rating, without having users enable this. Reason being that we used to show a pro and con of titles we review, however, the team wants to do away with this. Meaning we would have to re-visit every review we’ve done and enabling this option via code would be a lot easier and cleaner than manually do it.

    I poked around the php and I didn’t see any option to do so.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    Sure! The review box can be completely customized. Kindly copy box-templates/default.php from the plugin directory to a wp-review subdirectory in your theme folder like so: wp-content/themes/ACTIVE_THEME/wp-review/default.php

    You can then remove the following which shows both the total rating and description

        <?php if ( ! $review['hide_desc'] ) : ?>
            <?php if ( $review['desc'] ) : ?>
                <div class="review-desc">
                    <p class="review-summary-title"><strong><?php echo $review['desc_title']; ?></strong></p>
                    <?php echo do_shortcode( shortcode_unautop( wp_kses_post( wpautop( $review['desc'] ) ) ) ); ?>
                </div>
            <?php endif; ?>
            <?php if ( ! empty( $review['total'] ) ) :
                $total_text = $review['total'];
                if ( $review['type'] != 'star' ) {
                    $total_text = sprintf( $wp_review_rating_types[$review['type']]['value_text'], $total_text );
                }
             ?>
                <div class="review-total-wrapper">
                    <span class="review-total-box"><?php echo $total_text; ?></span>
                    <?php if ($review['type'] != 'point' && $review['type'] != 'percentage') : ?>
                        <?php echo wp_review_rating( $review['total'], $review['post_id'], array('class' => 'review-total') ); ?>
                    <?php endif; ?>
                </div>
            <?php endif; ?>
        <?php endif; ?>

    Hope that helps.

    • This reply was modified 8 years, 1 month ago by MyThemeShop.
    Thread Starter kdmitchell27

    (@kdmitchell27)

    Thank you!

    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello,

    Glad that helped. Please let us know if you need any assistance. We’re here to help.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Any way to enable Hide Description & Total Rating permenatly?’ is closed to new replies.