Tag Info

Hot answers tagged

2

The easiest way: create a page template that only includes the search form (get_search_form()) create a page and assing the template In the href attrib of the iframe, instead of put the url for searchform.php put the url of the page Pretty easy, but you need a query to get the page. A more performant way is to use fancybox without iframe, but via ajax, ...


1

Your search form includes this: <input type="hidden" name="post_type" value="postpage" /> So when your search page loads, the query variable 'post_type' is set to load posts of type 'postpage'. Since posts are of type 'post' and pages are of type 'page', neither of which are 'postpage', you do not get what you expected. Next time, don't use ...


1

You could hook into the the_permalink filter and check for is_search() to conditionally modify the URLs of your search results to include some additional parameters that your single.php then checks for. Something like this (may require tinkering): add_filter( 'the_permalink', 'wpse155331_the_permalink' ); function wpse155331_the_permalink( $url ) { if ( ...



Only top voted, non community-wiki answers of a minimum length are eligible