WordPress.org

Ready to get started?Download WordPress

Forums

WP Customer Reviews
Place the reviews and buttons anywhere - secret solution (11 posts)

  1. aniltc
    Member
    Posted 1 year ago #

    By default,every time you give reviews you get forms and all the reviews below the review button.By implementing this you can place the button and form anywhere and reviews too.In nutshell,both reviews form and reviews are independent now
    Step1
    open wp-customer-reviews.php file
    step2
    find this code

    add_shortcode( 'WPCR_SHOW', array(&$this, 'shortcode_wpcr_show') );
    insert following code after the above line
     add_shortcode( 'WPCR_SHOW_ATC', array(&$this, 'shortcode_wpcr_show_atc') );

    step3
    just find following code

    function shortcode_wpcr_insert() {

    step4

    inserrt the below code just before the step3 function.
    function shortcode_wpcr_show_atc() {
    		$this->force_active_page = 1;
    		$is_active_page = $this->is_active_page();
    		global $post;
    		 $the_content='';
    		//$inside_div = true;
    
           // $this->force_active_page = 1;
          //  return $this->do_the_content('shortcode_insert');  
    
    		//echo "anil".$post->ID;
    		//echo $inside_div;
    		//echo $this->options['reviews_per_page'];
    		$ret_Arr = $this->output_reviews_show( $inside_div, $post->ID, $this->options['reviews_per_page'], -1 );
    		//print_r($ret_Arr);
             $the_content .= $ret_Arr[0];
            $total_reviews = $ret_Arr[1];
    
            $the_content .= $this->pagination($total_reviews, $this->options['reviews_per_page']);
    		return   $the_content;
        }

    step5
    find this function
    function do_the_content($original_content) {

    and just comment out following code

    /* $ret_Arr = $this->output_reviews_show( $inside_div, $post->ID, $this->options['reviews_per_page'], -1 );
            $the_content .= $ret_Arr[0];
            $total_reviews = $ret_Arr[1];
    
            $the_content .= $this->pagination($total_reviews, $this->options['reviews_per_page']);
    */

    thats all

    Now you will get only reviews button and form on that page,you can display the customer reviews in any page by using the following short code in page/post
    [WPCR_SHOW_ATC]

    If you need any help post here or mail me [ redacted support is offered via the forums and not email ]

    http://wordpress.org/extend/plugins/wp-customer-reviews/

  2. It's good that you're sharing and all but when the plugin gets updated you will lose all of your edits.

    Have you considered contacting the author about this patch?

    http://www.gowebsolutions.com/wp-customer-reviews/

    Look at the top right corner of that page, the contact info is hard to miss...

  3. aniltc
    Member
    Posted 1 year ago #

    One of the member needs this kind of a solution here.I just did it for him.As you have mentioned,If we update to new version,all info will be lost.

    I hope all are here can understand this.I can easily make this changes from admin side by implementing new codes,but i am sure that will be lost by the next update.

    You guys will have to implement this code again if the author updates the plugin.

  4. Sharonq
    Member
    Posted 1 year ago #

    The author is not currently updating. I need this feature too.

    Hopefully on the next update this will be included and there will be no need.

    The plugin already has the ability to display reviews anywhere - so this allows the button to be separated from the review - wonderful - thanks for sharing.

  5. Sharonq
    Member
    Posted 1 year ago #

    quote from website:

    Due to the overwhelming response, we are not able to provide individual customizations for this plugin. We have future plans of updating including average star ratings and avatars, but no release date is currently available. Before leaving negative comments, please keep in mind that we spent our time, money and resources creating this plugin and offering it to everyone for free.

  6. Sharonq
    Member
    Posted 1 year ago #

    Tried this and it worked well - except I lost my pagination - so only the first page of reviews is displayed.

    Any idea how to get the pages back? Did I miss a shortcode parameter?

  7. aniltc
    Member
    Posted 1 year ago #

    please provide the live url and I haven't yet checked the pagination.

  8. aniltc
    Member
    Posted 1 year ago #

    This code working properly for pagination.There is no issues.If anyone have issues please let me know the live url

  9. Sharonq
    Member
    Posted 1 year ago #

    Thanks - somehow it reset to 10 views on a page - originally was 5.

    What is stop 2 about? Why do we need to find that code?

  10. Sharonq
    Member
    Posted 1 year ago #

    http://testdrive.teamsfirst.ca/silver-listing-example/

    has six reviews but pagination has been lost

    Oh - I figured out step 2 - the direction are inside the code tag

  11. EllsWeb
    Member
    Posted 1 year ago #

    This is a great hack, however, when approving the review, the script looks for the page id that the shortcode [WPCR_INSERT] is on and not the page id that has the [WPCR_SHOW_ATC]. So, the output is never shown. I have to go into the database and change the page id every time a review is approved and then it will show.

    I have looked and cannot see where to make the change to force the plugin to look for the right shortcode. Or did I do something wrong?

    [edit]

    I figured out I can just use the [WPCR_SHOW POSTID="ALL"] shortcode and the reviews will show up regardless what page_id is used for the [WPCR_INSERT] shortcode. I will keep looking though, because I only use one page at this time. I would like it to automatically show with the new shortcode created by this thread.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic