How to include custom search template in theme search.php
-
Hi. I have a custom search template for my custom post type. i just want to include that in my search.php. The idea is to display post thumbnail in 4 column grid layout. So i added this just after loop begins
if(wp_verify_nonce($_GET['s'], ‘awqsfsearch’) ){ include(TEMPLATEPATH . '/search-phones.php'); } else { include(TEMPLATEPATH . '/search.php');
but when i search, it display default search result layout along with 4-5 lines of codes. I think i am doing somewhere wrong as i am not a coder. Could you please figure it out?
https://www.ads-software.com/extend/plugins/advance-wp-query-search-filter/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to include custom search template in theme search.php’ is closed to new replies.