Support » Plugin: Site Reviews » Integrating Reviews with “My Profile” Page

  • Resolved pecondie


    Hi all,

    For my current site, I’m attempting to link reviews written by users to their “my profile” page. Is there a way to do this with Site Reviews? Any advice would be helpful! Thanks!

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


    You can do something like this:

     * Restrict reviews to those created by a specific user
     * Paste this in your active theme's functions.php file.
     * @param array $query
     * @param array $shortcodeArgs
     * @return array
    add_filter('site-reviews/get/reviews/query', function ($query, $shortcodeArgs) {
        $isUserPage = false; // <- Perform a check here to only run on the author page
        $userId = 0; // <- set the user ID here
        if ($isUserPage && $userId) {
            $query['author'] = $userId;
        return $query;
    }, 10, 2);

    Note: It is not possible to do this with the summary.

    Plugin Author Gemini Labs


    Alternatively, you can do this instead:

    This will automatically create a unique Site Reviews category for every user that submits a review. You can then use these categories to filter reviews by user.

    This method will also work for review summaries.

    Thanks! This helped integrate the account user name to the review and categorized reviews based on user, however, it is not visible on the person’s account profile page. I am using the “ultimate member” plugin for account profiles and it shows posts/comments, however, not categories or the reviews. Is there a way around this/a different account plugin you would recommend?

    Plugin Author Gemini Labs


    @pecondie @ultimatemember

    Please see this:

    And this:

    To use the shortcodes with this method, you will need to use the do_shortcode function.

    For example:

    $userCategorySlug = 'u_'.um_profile_id();
    $shortcode = sprintf('[site_reviews category=%s]', $userCategorySlug);
    echo do_shortcode($shortcode);

    Please contact the Ultimate Member team directly if you require further help with their plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.