0
votes
1answer
21 views

Get the search element only on 404

I know get_sidebar( ); is used to get the widget sidebar , but how do I request one element from it? For instance, if I want to show the search or most read only? I know there is a way to specify ...
0
votes
0answers
12 views

Broken pagination on custom search query

I've been searching through various questions and answers for some time now, but can't figure it out. I should state that I'm still a novice when it comes to WP coding. The thing is, I'm using a ...
0
votes
2answers
96 views

How does WordPress know if a URL doesn't exist?

The WordPress theme I am using didn't come with a proper Error 404 handler and I'd like to add one to the code. I am having a hard time how WordPress determines if a URL does exist as a post, is a ...
0
votes
1answer
41 views

If searched in a category show different 404 page

Is this possible? I have a searchform that searches for certain categories. If there is no post, it will show me a 404 page... Can I change this page to something else? If so, how do I do that?
1
vote
1answer
72 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() ...
1
vote
2answers
1k views

Wordpress triggers 404 on page 2 for custom search query

I modified my index.php to check if the search query is an author and if yes, display articles of that author. That is working fine but as soon as you go to page 2 of the results, wordpress triggers ...
4
votes
2answers
4k views

Display search results within the same page

Problem I have a page on my site where I need to do additional searching within that page. I am using the default way of WordPress searching with <?php get_search_form(); ?> for my main header ...
0
votes
1answer
71 views

Enhancin 404 to contain a search from URL

I have migrated to WordPress from other (probably unknown to you) free blogging site (bloguje.cz if you are curious) The issue is, that previous system had sometimes URL ending with ".php" and ...
1
vote
3answers
3k views

Change loop.php for empty search customization

I've been stumped for days wondering why when I submit an empty string as a search term, it redirects to part of loop.php where I have the following code inserted: <?php /* If there are no posts ...
0
votes
1answer
439 views

How to return HTTP 404 when no search results found?

When user search and there is no results found wordpress still return 200 OK. I want to change it to 404 Not Found. Is it possible to return 404 Not Found header in search.php? If yes, how to do ...