Print

Add Ads to Search Result Page

One of WP QUADS default settings is to disable ads on WordPress search result pages.Usually on such kind of pages there is not enough unique content to serve ads compliant to google AdSense policy. If you are using other ad vendors or you just want to overwrite this behavior for any other reason you can use the following method:

Copy the following code into the functions.php of your WordPress theme:

function prefix_show_ads_on_search_page($showads){
if (is_search()){
$showads = true;
}
return $showads;
}
add_filter('quads_show_ads','prefix_show_ads_on_search_page');

You can adapt this snippet to overwrite other ad visibility conditions as well:

  • is_feed()
  • is_search()
  • is_404()