• Resolved gediweb

    (@gediweb)


    Hi,
    My client wants to be able to give visitors the ability to:

    1. search site reviews
    2. display site reviews by category

    Here is a screenshot of what they are looking to accomplish: https://snipboard.io/e6i9YJ.jpg

    For #1 I’ve seen you give this link to put into functions.php page: https://pastebin.com/XWpekXXA But not sure how to embed the search itself onto a page.

    For #2 On another thread, you helped me integrate this with my member profiles with the following code:

    
    echo do_shortcode(sprintf('[site_reviews_summary category="%s" category_name="%s" hide="bars,if_empty,rating" class="summ"]', $category, $categoryName));
    echo do_shortcode(sprintf('[site_reviews category="%s" category_name="%s" hide="assigned_to,avatar" pagination="ajax"]', $category, $categoryName));		
    echo do_shortcode(sprintf('[site_reviews_form category="%s" category_name="%s"]', $category, $categoryName));
    

    So each profile (doctor) has it’s own reviews but these doctors all have an assigned specialty.
    With this setup, will I be able to assign a category (specialty) and list by category: How would I accomplish this?

    • This topic was modified 4 years, 9 months ago by gediweb.

    The page I need help with: [log in to see the link]

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

    (@geminilabs)

    1. If you can wait a week or two, you can test the beta version of the Filters add-on.

    2. If you were using a different directory plugin that gave each doctor their own post ID then this would be easy to do. However, the directory plugin you are using creates lists (i.e. the specialties), and doctor information is added to these lists as meta data. This is why we had to use the workaround where a unique Site Reviews category is generated for each doctor and then the reviews are linked to these categories.

    The only way you can do this is to also assign reviews to the list IDs, for example:

    $listPostId = ''; // set this to the post ID of the list
    
    echo do_shortcode(sprintf('[site_reviews_summary assigned_to="%s" category="%s" category_name="%s" hide="bars,if_empty,rating" class="summ"]', $listPostId, $category, $categoryName));
    
    echo do_shortcode(sprintf('[site_reviews assigned_to="%s" category="%s" category_name="%s" hide="bars,if_empty,rating" class="summ"]', $listPostId, $category, $categoryName));
    
    echo do_shortcode(sprintf('[site_reviews_form assign_to="%s" category="%s" category_name="%s" hide="bars,if_empty,rating" class="summ"]', $listPostId, $category, $categoryName));

    This will then do both, assign the review to the ID of the list post_type, and auto generate a category for each list item and assign the reviews to that generated category (as you are already doing).

    The only tradeoff here is that since you are assigning to both a category and a post ID, Site Reviews will not be able to cache the summary rating counts on the page that lists all reviews for a speciality.

    @geminilabs

    Thank you for an amazing plugin! This is by far the best rating plugin I’ve seen.

    What is the ETA for the filter plugin? If it’s planned to later this year, do you have any suggestion on 3rd party plugins I can use to get a good filtering function?

    With best regards,

    bb

    Plugin Author Gemini Labs

    (@geminilabs)

    @bba01 The filters addon was delayed (as you may have guessed) due to other commitments. I am currently working on finishing up Site Reviews v5.0 before focusing attention back to the addons.

    I don’t have a suggestion for 3rd-party plugin that would work with Site Reviews. For now you can have a look at this snippet: https://pastebin.com/XWpekXXA however, be aware that v5.0 may break it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search Site Reviews’ is closed to new replies.