Skip to content

Instantly share code, notes, and snippets.

@thomasgriffin
Created September 16, 2014 18:51
Show Gist options
  • Save thomasgriffin/bb64bcb7dd3303ade782 to your computer and use it in GitHub Desktop.
Save thomasgriffin/bb64bcb7dd3303ade782 to your computer and use it in GitHub Desktop.
Remove Soliloquy sliders from search results.
<?php
add_filter( 'soliloquy_post_type_args', 'tgm_soliloquy_remove_from_search' );
function tgm_soliloquy_remove_from_search( $args ) {
$args['exclude_from_search'] = true;
return $args;
}
@sshawuk
Copy link

sshawuk commented Dec 29, 2014

Hi Thomas,
Very interested in implementing this on my site. Could you advise as to where this code needs to be implemented in order to function? I was about to stick it in searchform.php but thought it best to check first. Can I just paste this in unedited or do I need to update any of the arguments to reflect my setup?
Many thanks,
Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment