0
Answered

Don't Show Reviews on Select Pages

david 3 years ago updated by Josh 3 years ago 6

We want reviews to show only on select pages. Did we miss this feature somewhere in the documentation? Or does the plugin only show reviews site-wide? 

We can hide them with CSS, but we don't want the text to show to search engines either. 

Under review

Normally you would only add the Shortcode for the review template to the pages you want to show the reviews on. How are you adding the reviews to all the pages?

I am skeptical that anything is is done "normally." We include the reviews sitewide because our landing traffic is widely distributed. We want it on far more pages than those that we don't want it on. We can use other plugins to control which sitewide features appear on which page, but it's more convenient to find this feature in each plugin's settings. 

Sorry, there is no plugin setting controlling which pages. If you are using the do_action code, you can just add a conditional page check. For example...

if (!is_page(92)){

do_action( 'wprev_pro_plugin_action', 5 );

}

That will show it on all pages but ID 92. You can use multiple pages with is_page. Here is more about it...

https://developer.wordpress.org/reference/functions/is_page/

Yeh, but we prefer not to escalate content management to a programming job.

But you mistated there's no plugin for "controlling which pages" - it's just not part of this plugin. 

If it's not part of the plugin, it's not there. We just thought we were missing something.

It can otherwise be done at the content management layer by managing dynamic widgets without mucking up php files. 

Correct, there is currently no setting in this plugin for controlling site-wide visibility. That's what I meant when I said..."Sorry, there is no plugin setting..."