0
votes
2answers
69 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
38 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
57 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
897 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
3k 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
70 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
2k 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
393 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 ...