Support » Plugin: WP Customer Reviews » Reviews are showing automatically after post content

  • Resolved onedna

    (@onedna)


    Hello there

    I notice that the reviews are automatically showing after the post content. Is there any way to remove the reviews from the end of the posts?

    The reviews are calling after the_content()

    I want to show the reviews by using the short code only

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi.

    Here is my solution to placed in functions.php

    
    /**
     * Adds a hidden tag to a post content to suppres review form since we output it in another place.
     * 
     * https://uk.wordpress.org/plugins/wp-customer-reviews/
     *
     * @param string $content
     * @return void
     */
    function suppres_review_output( $content ) {
    	$post = get_post();
    
    	if ( ( !empty( $post->ID ) ) ) {
    		$content = '<!-- data-wpcr3-content="' . $post->ID . '" !-->' . $content;
    	}
    
    	return $content;
    }
    add_filter( 'the_content', 'suppres_review_output', 10 );
    
    • This reply was modified 2 months, 3 weeks ago by  gruz.

    Its Working , A Big Thank You !

    Plugin Author Aaron Queen

    (@bompus)

    This is usually due to a theme conflict. Looks like you resolved it though!

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