Skip to content

Instantly share code, notes, and snippets.

@cagriuckan
Created August 10, 2016 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cagriuckan/cbd8f00d5ef4b0a4e1d9fc04bccc5171 to your computer and use it in GitHub Desktop.
Save cagriuckan/cbd8f00d5ef4b0a4e1d9fc04bccc5171 to your computer and use it in GitHub Desktop.
Wordpress custom post tyle search.php
<?php
$post_type = $_GET['post_type'];
if ( isset( $post_type ) && locate_template( 'search-' . $post_type . '.php' ) ) {
get_template_part( 'search', $post_type );
exit;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment