Title: Conditional display?
Last modified: August 26, 2023

---

# Conditional display?

 *  Resolved [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * (@mikeybayer)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/)
 * Hi there —
 * Just purchased the pro version and can’t wait to get the max value from the features.
   I do have one question that I don’t think the pro features will naturally help
   me with. On my film website, I will use a review form to allow users to leave
   a rating alone OR a rating along with a review for each film (using template 
   for custom post type). On each film’s page, however, I only want to display the
   actual written reviews (along with their ratings) from users, not ratings alone.(
   The average rating for each film will appear at the top of each film’s page).
   Right now, the reviews summary is also including an individual listing for each
   user who only provided a numerical rating, which is a waste of space. How do 
   I get rid of those and only include the written reviews in the reviews summary?
   Thanks. – Mike
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-display-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17003464)
 * FYI: If you have Site Reviews Premium, then you also have access to [dedicated support](https://niftyplugins.com/account/support/)
   from your Nifty Plugins account page.
 * > I will use a review form to allow users to leave a rating alone OR a rating
   > along with a review for each film […] On each film’s page, however, I only 
   > want to display the actual written reviews (along with their ratings) from 
   > users, not ratings alone
 * The easiest way to do this is to create two Site Reviews categories, one for 
   the rating-only reviews and on for regular reviews.
 * For example (using the shortcodes as an example, but you can do the same with
   the Blocks and Elementor widgets), assuming you created two categorys with the
   slugs, “rating-only” and “full-review”:
 * **Rating-only form:**
 * [site_reviews_form assigned_terms=”rating-only”]
 * **Regular Review Form**:
 * [site_reviews_form assigned_terms=”full-review”]
 * **Rating Summary from reviews with text:**
 * [site_reviews_summary assigned_terms=”full-review”]
 * **Reviews with text only:**
 * [site_reviews assigned_terms=”full-review”]
 *  Thread Starter [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * (@mikeybayer)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17003581)
 * Ah, categories sounds like a great idea. I get how I can use the shortcodes that
   way, per your suggestions above, but my question is do I have to manually categorize
   each review as it comes in depending on whether or not the user included a written
   portion? Hope not. Is there a way that a review can be automatically categorized
   depending on which fields are left blank? For example, what I have now is one
   review form to be filled in at the bottom of each film page where the rating 
   is mandatory and the review title and review text fields are both labeled optional.
   How can I categorize each review automatically depending on what they fill out(
   or leave blank)? Thanks!
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17003816)
 * Ah, I though you were using two different forms.
 * You’ll need to use a code snippet in that case. The easiest way to add a code
   snippet to your site is with the [Code Snippets](https://wordpress.org/plugins/code-snippets/)
   plugin.
 * This code snippet will add a “has-content” category to your reviews if a review
   was written with the rating. If the Category does not exist, it will create it:
 *     ```wp-block-code
       add_action('site-reviews/review/created', function ($review) {
           if (empty($review->content)) {
               return;
           }
           $slug = 'has-content';
           $name = 'Has Content';
           if (!term_exists($slug, glsr()->taxonomy)) {
               wp_insert_term($name, glsr()->taxonomy, compact('slug'));
           }
           wp_set_object_terms($review->ID, $slug, glsr()->taxonomy);
       });
       ```
   
    -  This reply was modified 2 years, 9 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
 *  Thread Starter [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * (@mikeybayer)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004316)
 * Hooray! This code worked. And thanks for recommending the Code Snippets plugin–
   it actually allowed me to deactivate two other plugins. Now, I have one other
   Site Reviews problem. The All Reviews dashboard page is displaying all the reviews
   but when I try to search or filter by any terms, it returns zero results. Clearly,
   the search and filter function is not working in the dashboard. Any suggestions??–
   Mike
 *  Thread Starter [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * (@mikeybayer)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004839)
 * Actually, the categorization ran me into another problem too. It seems there’s
   a conflict between assigned terms and assigned posts. When I’m trying to display
   the reviews assigned to a given film post on that film’s page (again I’m using
   an Elementor template for more than 1,000 films), ALL of the reviews for all 
   of the films are appearing. When I remove the assigned-terms from the shortcode,
   then it only displays that film’s reviews but includes the ones without content.
   Here is the shortcode I’m using in an Elementor shortcode widget in the template:
 * [site_reviews assigned_posts=”post_id” 
    display=”10″ pagination=”ajax” filters
   =”sort_by”  assigned_terms=”has-content”  hide=”assigned_links,avatar,images,
   response” ]
 * Again, when I remove the assigned-terms part, then it seems to only include the
   current film’s reviews, but won’t limit it to the has-content category. Any suggestions?
   I have deactivated and activated the plugin and cleared all my cache, still no
   luck. If it would be easier for me to handle this in the premium support forum,
   let me know. Thanks. – Mike
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004882)
 * Is the “Review Assignment” setting set to Strict Assignment?
 *  Thread Starter [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * (@mikeybayer)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004884)
 * Dang! That did the trick. I feel dumb for that one. That did not fix the problem
   with the dashboard search and filter I mention above, FYI. And one final question:
   How can I get rid of “Review of” before the assigned links? I don’t see that 
   option in the list of changeable strings.
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004899)
 * ![](https://i0.wp.com/i.imgur.com/deySoaY.png?ssl=1)
 * I just tested the Search and Filter on the all Reviews admin page and it works
   for me.
 * The search allows you to search the Title and Content of reviews (it’s the same
   WordPress search functionality as on the All Posts and All Pages admin pages).
   Are you searching for something in the title or content only?
 * The Categories filter is also working here.
 * ![](https://i0.wp.com/i.imgur.com/cM7BWFf.png?ssl=1)
 * ![](https://i0.wp.com/i.imgur.com/UlwwlYa.png?ssl=1)
 * ![](https://i0.wp.com/i.imgur.com/NWnYk9S.png?ssl=1)
 * If that’s not working, you may need to try the troubleshooting steps outlined
   on the Help & Support page as you may have a plugin installed that is conflicting
   with Site Reviews on the admin pages.
    -  This reply was modified 2 years, 9 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).
 *  Thread Starter [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * (@mikeybayer)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004925)
 * Wow, thank you. I’ve made sure everything is set up properly with the dashboard
   and searches and filters are still getting zero results. (Sorting by clicking
   on the column headers does work.) Anyway, I’ll give it some time and maybe it
   will come back. If not, I will open a ticket at the other support forum.
 * Your responsiveness has been outstanding. Thank you very much. I’m going to go
   leave a review right now.

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

The topic ‘Conditional display?’ is closed to new replies.

 * ![](https://ps.w.org/site-reviews/assets/icon-256x256.gif?rev=3307009)
 * [Site Reviews](https://wordpress.org/plugins/site-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/site-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/site-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/site-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/site-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/site-reviews/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [mikeybayer](https://wordpress.org/support/users/mikeybayer/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/conditional-display-9/#post-17004925)
 * Status: resolved