• Resolved Tomek Tomczuk

    (@timovega)


    @geminilabs is there any shortcut that will give me:

    <div class=”glsr-review”></div>
    <div class=”glsr-review”></div>

    for each review without below wrapping

    <div class=”glsr-shortcode shortcode-site-reviews”>
    <div class=”glsr-reviews-wrap”>
    <div class=”glsr-reviews”>

    </div>
    </div>
    </div>

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Tomek Tomczuk

    (@timovega)

    This is what I’m referng too
    Image and video hosting by TinyPic

    Thread Starter Tomek Tomczuk

    (@timovega)

    So for this shortcut [site_reviews count=999 schema=true hide=title,date] I would like to get each review in <div class=”glsr-review”></div> without 3 parents above .

    Plugin Author Gemini Labs

    (@geminilabs)

    @timovega

    This is only possible in the latest v3.0 beta of Site Reviews.

    1. Download the beta from here: https://github.com/geminilabs/site-reviews-v3/archive/v3.0.0-beta-6.zip

    2. Paste the following code into your theme’s functions.php file:

    /**
     * Remove the Site Review shortcode wrapper DIV
     * Paste this in your active theme's functions.php file.
     * @param array $args
     * @param string $type
     * @param string $partial
     * @return array
     */
    add_filter( 'site-reviews/shortcode/args', function( $args, $type, $partial ) {
        if( $type == 'shortcode' && $partial == 'site-reviews' ) {
            $args['before_widget'] = '';
            $args['after_widget'] = '';
        }
        return $args;
    }, 10, 3 );

    3. Create a folder in your theme called site-reviews and copy the “templates/reviews.php” file from the plugin into this folder. Edit the file you copied and change it to this:

    <?php defined( 'WPINC' ) || die; ?>
    
    {{ reviews }}
    {{ navigation }}

    HOWEVER…

    • The CSS styling of the reviews is tied to the parent DIV classes. Since you have removed the parent DIVs, the styling will no longer work. To fix this, you will need to manually add the .glsr-default class to whatever is the new parent DIV of the reviews.
    • The “class” and “id” options of the shortcode will also no longer function.
    Thread Starter Tomek Tomczuk

    (@timovega)

    thank you. This is what I wanted. I do not know why it shows “5 out of 5 stars (based on 1 review) where I have 2 reviews. Is there any way to import language translation?

    Plugin Author Gemini Labs

    (@geminilabs)

    1. Please test the summary shortcode with no options, (i.e. [site_reviews_summary]) if that fixes it, then you need to correct the options that you are using.

    2. If you are talking about the custom translations that you are able to add in the Site Reviews settings, then yes, you can import them from the Site Reviews Tools page (provided you are using v3.0) by importing a previously exported settings file.

    Thread Starter Tomek Tomczuk

    (@timovega)

    Ad1 I have recalculated it and it works now

    Ad2. I was thinking that you have a language file that you can import.

    In translation tab the search doesn’t work. When I put words the wheel is rolling but nothing happened. Do you know why?

    Plugin Author Gemini Labs

    (@geminilabs)

    Are you using the unreleased v3.0 beta?

    The translation search is broken but will be fixed in the next beta (probably tomorrow).

    Are you talking about a custom translation file that you have made?

    • This reply was modified 7 years, 6 months ago by Gemini Labs.
    Thread Starter Tomek Tomczuk

    (@timovega)

    yes I’m talking about translation search. I’m using this version https://github.com/geminilabs/site-reviews-v3

    Plugin Author Gemini Labs

    (@geminilabs)

    Thread Starter Tomek Tomczuk

    (@timovega)

    thank you, it’s working now. I have spotted another issue. When I add review I get it twice. Could you look into it as well?

    Plugin Author Gemini Labs

    (@geminilabs)

    I am unable to duplicate this. You will need to give me more information:

    1. How many submission forms (shortcodes and widgets) are on the page?
    2. What shortcode options are you using?
    3. What customisations (if any) are you using?
    4. Are you using the plugin in any non-standard way?

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

The topic ‘Shortening review wrapper’ is closed to new replies.