1
vote
1answer
16 views

get_search_link() redirects to 404 template page

I built a custom theme, and in it, there is a 404.php page and a search.php page. Elsewhere in the template, I wanted to link to the search page directly. So, I used the get_search_template() ...
0
votes
0answers
28 views

Incorrect template is being loaded [closed]

I have a custom category.php template within a theme which used to work. Since making changes to other template files for other types of pages, this has stopped working. Whenever I attempt to visit ...
1
vote
1answer
60 views

Get search.php results in header.php?

I want one image in header.php to change for different pages. The function in header.php looks like that: if(is_archive()): //change image to "Archives" endif; if(is_404()): //change image to ...
1
vote
1answer
74 views

Search results when none found - stay on page they were on

I currently have a sidebar with a search-form at the top. When the user types in a keyword, when submitted the user is took to a page with search results with posts relating to them words in each ...
1
vote
2answers
64 views

How to check if searchform.php is being included as widget?

I'd like to put something like this in searchform.php: <?php if($widget){ ?> //load serach form for sidebar... <?php }else{ ?> //load different search form for page content (404 ...
0
votes
2answers
206 views

Include different loop templates in search query

I have differnet Custom Post Types in my blog. I also have custom templates for each of them like loop-{$cpt-name}.php I would like to include different cpt templates dynamically in search results ...
3
votes
1answer
650 views

Template issues getting ajax search results

I'm trying to put search results into a div with ajax. The issue is I'm getting errors saying undefined function have_posts() when the the search template is accessed. It also took issue with ...
0
votes
2answers
344 views

search page not found? (search.php or searchpage.php)

Am i wrong in thinking i can access the search page by using /search/ ? I've created the files search.php & searchpage.php but /search/ still returns 404? I want to customise the page a bit... ...
0
votes
2answers
391 views

More than one search results page template

On my current project, I have to create 2, distinct templates to receive 2 distinct search results of the same site. Both researches are coming from different forms on different templates/pages. ...
0
votes
2answers
339 views

How do I override the search template in a plugin?

How do I override the search template i.e. used inside a theme with a custom search page inside a plugin? Please point our any relevant action/filter hooks which can be used to do this. Any help is ...
0
votes
2answers
479 views

Searching multiple custom post types and pages

I'm using bainternet's method for searching custom post_types and it works great. However, I've recently been requested to return more than one "specific" post type and perhaps individual pages for a ...
0
votes
2answers
506 views

Custom post_type search pages

So I have a section on my site that specifically searches a custom post type for YouTube videos. I'm absolutely able to search the custom type. However, I'm unsure how to create a search page that has ...