Title: objetsdeplaisir's Replies | WordPress.org

---

# objetsdeplaisir

  [  ](https://wordpress.org/support/users/objetsdeplaisir/)

 *   [Profile](https://wordpress.org/support/users/objetsdeplaisir/)
 *   [Topics Started](https://wordpress.org/support/users/objetsdeplaisir/topics/)
 *   [Replies Created](https://wordpress.org/support/users/objetsdeplaisir/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/objetsdeplaisir/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/objetsdeplaisir/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/objetsdeplaisir/engagements/)
 *   [Favorites](https://wordpress.org/support/users/objetsdeplaisir/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Product Review Lite] Disabling the review box on a post](https://wordpress.org/support/topic/disabling-the-review-box-on-a-post/)
 *  Thread Starter [objetsdeplaisir](https://wordpress.org/support/users/objetsdeplaisir/)
 * (@objetsdeplaisir)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/disabling-the-review-box-on-a-post/#post-4967570)
 * Hi,
 * A simpler solution, if you only want to be able to disable the widget on a particular
   post after it had been enabled previously, but don’t especially need to change
   the location of the review box within your post:
 * In wp-product-review\css\dashboard_styles.css , line 77, comment “display:none;”
   for “.isReviewYes”:
 *     ```
       .isReviewYes {
   
         /*display:none;*/
   
       }
       ```
   
 * The checkbox “Is this a review post ?” will no longer disappear after saving,
   and it seems to solve the problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Product Review Lite] Options rated 0 do not appear](https://wordpress.org/support/topic/options-rated-0-do-not-appear/)
 *  Thread Starter [objetsdeplaisir](https://wordpress.org/support/users/objetsdeplaisir/)
 * (@objetsdeplaisir)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/options-rated-0-do-not-appear/#post-4990609)
 * Hi,
 * Here’s a solution:
 * In wp-product-review\inc\cwp_frontpage.php :
 * To fix the calculation of the average grade, line 74, replace:
 *     ```
       if(!empty($option1_grade)) { $overall_score += $option1_grade; $iter++; }
       if(!empty($option2_grade)) { $overall_score += $option2_grade; $iter++; }
       if(!empty($option3_grade)) { $overall_score += $option3_grade; $iter++; }
       if(!empty($option4_grade)) { $overall_score += $option4_grade; $iter++; }
       if(!empty($option5_grade)) { $overall_score += $option5_grade; $iter++; }
       ```
   
 * with:
 *     ```
       if(!empty($option1_grade)||$option1_grade==='0') { $overall_score += $option1_grade; $iter++; }
       if(!empty($option2_grade)||$option2_grade==='0') { $overall_score += $option2_grade; $iter++; }
       if(!empty($option3_grade)||$option3_grade==='0') { $overall_score += $option3_grade; $iter++; }
       if(!empty($option4_grade)||$option4_grade==='0') { $overall_score += $option4_grade; $iter++; }
       if(!empty($option5_grade)||$option5_grade==='0') { $overall_score += $option5_grade; $iter++; }
       ```
   
 * To fix the missing display of the “0” grades:
    - line 99, replace:
 *     ```
       if (!empty($option1_content) && !empty($option1_grade) &&  strtoupper($option1_content) != 'DEFAULT FEATURE 1')
       ```
   
 * with:
 *     ```
       if (!empty($option1_content) && (!empty($option1_grade)||$option1_grade==='0') &&  strtoupper($option1_content) != 'DEFAULT FEATURE 1')
       ```
   
    - line 119, replace:
 *     ```
       if (!empty($option2_content) && !empty($option2_grade) && strtoupper($option2_content) != 'DEFAULT FEATURE 2')
       ```
   
 * with:
 *     ```
       if (!empty($option2_content) && (!empty($option2_grade)||$option2_grade==='0') && strtoupper($option2_content) != 'DEFAULT FEATURE 2')
       ```
   
    - line 139, replace:
 *     ```
       if (!empty($option3_content) && !empty($option3_grade)&& strtoupper($option3_content) != 'DEFAULT FEATURE 3')
       ```
   
 * with:
 *     ```
       if (!empty($option3_content) && (!empty($option3_grade)||$option3_grade==='0')&& strtoupper($option3_content) != 'DEFAULT FEATURE 3')
       ```
   
    - line 159, replace:
 *     ```
       if (!empty($option4_content) && !empty($option4_grade) && strtoupper($option4_content) != 'DEFAULT FEATURE 4')
       ```
   
 * with:
 *     ```
       if (!empty($option4_content) && (!empty($option4_grade)||$option4_grade==='0') && strtoupper($option4_content) != 'DEFAULT FEATURE 4')
       ```
   
    - Line 177, replace:
 *     ```
       if (!empty($option5_content) && !empty($option5_grade) && strtoupper($option5_content) != 'DEFAULT FEATURE 5')
       ```
   
 * with:
 *     ```
       if (!empty($option5_content) && (!empty($option5_grade)||$option5_grade==='0') && strtoupper($option5_content) != 'DEFAULT FEATURE 5')
       ```
   
 * I hope this will help.
 * Best regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Product Review Lite] Disabling the review box on a post](https://wordpress.org/support/topic/disabling-the-review-box-on-a-post/)
 *  Thread Starter [objetsdeplaisir](https://wordpress.org/support/users/objetsdeplaisir/)
 * (@objetsdeplaisir)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/disabling-the-review-box-on-a-post/#post-4967567)
 * Hi [@codeinwp](https://wordpress.org/support/users/codeinwp/),
 * I tried to do a few modifications on my own, and I think I managed to find a 
   suitable solution.
 * A shortcode to put the review box anywhere in the post could solve this (with
   a shortcode, if one chooses “this is a review post” and saves a post by mistake,
   not adding the shortcode into the post allows to hide the review box), and also
   avoid the review box to be displayed after other plugins such as social media
   sharing.
 * This could be a third option proposed in “Review position”, in addition to “After
   content” and “Before content”.
 * The code to do this is very simple:
    - In wp-product-review\admin\inc\config.php, line 457, add a third option “Shortcode”
      to the array options:
 *     ```
       array(	"type"=>"select",
       	"name"=>"Review position",
       	"description"=>"Position of the review box",
       	"id"=>"cwppos_show_reviewbox",
       	"options"=>array("yes"=>"After content","no"=>"Before content","shc"=>"Shortcode"),
       	"default"=>"yes"
       )
       ```
   
    - In wp-product-review\inc\cwp_frontpage.php, line 315, add a third return value
      to the function cwp_pac_before_content($content), when the option chosen for“
      Review position” is “Shortcode”:
 *     ```
       if(cwppos("cwppos_show_reviewbox") == 'shc')
       	return preg_replace ( '[\[wp-product-review\]]' , $return_string , $content, 1);
       ```
   
 * I would be really grateful if you could add an option like this to your plugin.
 * Best regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Product Review Lite] Disabling the review box on a post](https://wordpress.org/support/topic/disabling-the-review-box-on-a-post/)
 *  Thread Starter [objetsdeplaisir](https://wordpress.org/support/users/objetsdeplaisir/)
 * (@objetsdeplaisir)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/disabling-the-review-box-on-a-post/#post-4967450)
 * Hi [@codeinwp](https://wordpress.org/support/users/codeinwp/),
 * Thanks for your fast answer.
 * On a local copy of my blog, I tried to deactivate all other plugins except WP
   Product Review. The behaviour of the radio buttons “Is this a review post?” seems
   to be the same: after answering “Yes”, they disappear when I save the article,
   and the review box cannot be removed any more.
 * Thanks again for your help.
 * Best regards.

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