a 404 error occurs when the requested page cannot be found
8
votes
5answers
650 views
Getting hierarchical custom post type permalinks to work just like pages
I've dug through every question here on custom post type permalinks, but most seem to be either problems with custom taxonomy rewrites, or the obvious missing of flush_rewrite_rules(). But in my case, ...
6
votes
6answers
7k views
Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
I refer to this question previously asked and not suitably answered:
Wordpress overriding actual subdirectories
and also
Non "Wordpress" pages/code getting 404 error.
I have the same ...
6
votes
3answers
2k views
Are there any hooks that alter the 404 logic?
Provided you have a 404 page defined in your theme, Wordpress will display a 404 page if "tag" is defined in $wp_query->query_vars, and there are no posts matching that tag.
I'm writing a plugin that ...
5
votes
2answers
2k views
Redirect Restricted Page to 404
Is there a way to show a 404 page if the current logged in user does not have the right clearance to view the page? I am looking for a PHP method, something like
if( ...
5
votes
1answer
733 views
Why when I submit a form in wordpress it loads a 404 page though URL is correct
I am just creating a simple contact form, but I notice that it seems to post to an invalid page. The url in the browser is correct but the title of the page is "Page not found"
on the top of the page
...
5
votes
5answers
2k views
How do I skip wordpress's 404 handling and redirect all 404 errors for static files to 404.html?
How do I skip wordpress's 404 handling and redirect all 404 errors for static files to 404.html?
I read and it seems its not possible when using permalinks?
The objective is to reduce the server ...
4
votes
5answers
4k views
How to eliminate weird 404 errors in wp-admin?
I run a WordPress site with about 70 active plugins.
Every so often, I'll get a random error page ("Not Found", though I haven't checked the headers to see if it's a 404) on a /wp-admin/ page that ...
4
votes
2answers
1k views
How to Change 404 page title
i have try many methods after searching on internet but unable to ramove Nothing Found from my 404 page title
how to do it please help me
even i have us this in my 404 page header
if( is_404() ) ...
4
votes
3answers
661 views
Custom Post Types 404 Issue
I dont know why my custom post types render the Page not found. This is the code I am using to register custom posts.
www.example.com/products/product1/ renders 404 where as ...
4
votes
2answers
2k 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 ...
4
votes
3answers
845 views
External page integrated into WordPress returns a 404 error
I have a script that I'd like to call via AJAX from my WordPress theme, it relies upon some core WordPress functions so I am including WordPress blog header like so:
define( 'WP_USE_THEMES', false );
...
3
votes
1answer
132 views
How to display wp_nav_menu() conditionally only when not on a 404 page?
I made a custom design for my site. On my header i put my navigation so everytime i call the header the navigation will be called to, so that i would not be calling it all the time.
But now i have a ...
3
votes
2answers
165 views
Custom post type 404s with rewriting even after resetting permalinks
I created a custom post type, of which the (simplified) arguments are:
register_post_type(
'Event',
'public' => true,
'rewrite' => array( 'slug' => 'eventy'),
'has_archive' ...
3
votes
3answers
822 views
404 error on homepage when using Nginx proxying to Apache
I generally use Nginx to serve static content on my server, with Apache handling PHP content using PHP-FPM. However, I'm not able to get a Wordpress blog homepage to display and I've tried all the ...
3
votes
2answers
296 views
Uploaded image, but not showing
I have a reasonably fresh WordPress install on my Ubuntu Linux server and I uploaded an image to it for use in a blog post. I checked the path in WordPress settings and I checked the contents on the ...
3
votes
3answers
336 views
Hierachical Custom post types permalinks not working
Been looking for someone with this same problem for hours now so I decided to post my own thread.
I have a hierachical custom post type called contact-information. Using this I have parentpages ...
3
votes
0answers
75 views
404 redirection and Google's index [closed]
I have several dead pages, which are annoyingly still indexed in Google.
I've set my 404.php to redirect to my homepage using wp_redirect, however I'm worried that this will prevent Google from ...
2
votes
2answers
700 views
How to trigger 404 for custom query var?
How can you trigger a 404 when using custom query vars? I've got re-write rules written for a custom query var, but if you were to request a URL for the query var that should technically be a 404 it ...
2
votes
1answer
265 views
Pagination with custom post types results in 404 issues
I've a very simple index.php:
<div id="content">
<? get_template_part('content', get_post_format()) ?>
</div>
<div id="pagination">
<? previous_posts_link() ?>
...
2
votes
3answers
3k views
Custom post type pagination 404 fix?
Been trying to get this working all day but haven't had any luck...
I have a custom post type called 'news' and an archive template (archive-news.php), here I'd like to show 2 posts with pagination, ...
2
votes
1answer
53 views
Putting footer content in a “page” - Doing it wrong?
So, in my shortish WordPress development career, I've gotten in the habit of creating a "page" for the content in a footer, and adding different fields with the wpalchemy class. Everything with this ...
2
votes
2answers
824 views
Non existing blog pages are not redirected to 404
I've got a page called Blog. In the Settings -> Reading I've set my Blog page as Posts page. In the menu when I click on the Blog link the posts are loaded correctly and pagination works, so far so ...
2
votes
1answer
151 views
Redirect feed to 404 page
I would like to redirect my visitors to my 404 when they visit any feed of my page. Something like this. I would liek to do this without changing the header URL.
function fb_disable_feed() {
// ...
2
votes
1answer
389 views
Debugging WP routing
For some posts, I see 404 page, even though posts exist, where is the place in WP where using permalink is decided what object needs to rendered?
Thanks!
2
votes
4answers
1k views
How to fix strange 500 Error after Editing Menu?
I have strange situation which just started which I seem to be unable to resolved. I am not sure what this might be related to but I think I remember reading somewhere that this has happened to ...
2
votes
1answer
37 views
Detect 404 before headers are sent
I've a piece of code that shows a banner the first time a user visits, then sets a cookie, which prevents it showing again.
However, if the page has a 404 error, the 404 page of the requested ...
2
votes
1answer
119 views
Create second custom 404 page for selected post type
I created a new custom post type called event, which works fine.
I also created a custom 404 page template, which is shown if a event/page/post is not found.
But now the hard part, i want to create ...
2
votes
1answer
270 views
Setting 404 page in Nginx
I am using this page (http://wiki.nginx.org/WordPress) to setup my WordPress on a nginx/php-fpm server.
Everything is okay, except the 404 page
When I request www.example.com/foo, it send me the ...
2
votes
1answer
63 views
In wordpress I am manipulation 404 response. I want to give the response before 404 error is given to google
May be the question in title is not explaining what exactly I want. So I will explain one logic and then ask what problem I am getting from that.
We are using wordpress. We have 2 categories ...
2
votes
1answer
152 views
New categories are now going to 404s
I have a WPMU site with hundreds of blogs on it. We are on 3.4.2 and this is the first time I'm seeing this issue within a few of my sites.
Basically, what happens is that I'll create a new category ...
2
votes
1answer
61 views
Some posts returning 404 instead of displaying post
I'm having a problem with my Wordpress install. All of a sudden some of my posts return 404 errors when I try to go to their permalink. My post names are all numbers and this started happening when my ...
2
votes
1answer
291 views
Multisite custom post type's single page 404
I have two sites in my multisite setup - domain.tld (site A) and domain.tld/lifestyle (site B). This is my first multisite attempt.
I've made a widget that creates a custom post type "latest-news" ...
2
votes
1answer
509 views
Pagination gives 404 error
It's seems that this bug of WP never was solved by WP team.
I have custom post-type, my url structure is /%category%/%postname%/ And if i click on 2nd page i will get 404 error.
I tried everything i ...
2
votes
2answers
841 views
Including category-base in a post permalink results in 404
I have static front-page and separate page /news/ as the Posts page. I would like to have the single-post URLs like this:
www.example.com/news/categoryname/subcategory/postname/
and for the ...
2
votes
1answer
188 views
Best way to strip character entities (%20 etc)
I have a heap of images inside MovableType, on an old server. There are plenty which have character entities like %20 to represent spaces.
I've used some plugins to import the images and change the ...
2
votes
3answers
1k views
Preview posts returns 404
It's a large Wordpress multisite installation, using subfolders for the individual blogs, not domains. We are running version 3.1, and preview posts doesn't work. When I press preview I get the ...
2
votes
2answers
1k views
permalink changed, now getting 404 for every pages
i have my website with permalink,
till now everything was fine, but few days before i changed my permalink, now everything is going wrong,
now each and every page i am getting 404,
even my about-us ...
1
vote
4answers
200 views
How to force a 404 on WordPress
I need to force a 404 on some posts based on conditions. I managed to do it ( although I don't know if I did it the right way) and I'm a getting my 404.php template to load as expected.
My code:
...
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 ...
1
vote
2answers
410 views
WordPress Stats keeps showing non-existent post as a top post?
For some reason, one of my top posts as reported by WordPress Stats is actually non-existent...
What I see is:
#2147483647 (loading title)
and it links to "...?p=2147483647" which returns a ...
1
vote
2answers
1k views
Custom post type archive 404's with paginate_links
im using paginate_links function to create pagination on my custom post type archives, no matter what i do im hitting 404 errors when going to view page 2 (ie clicking to go on one page in the ...
1
vote
1answer
307 views
What does do_action('admin_init'); does actually?
What impact does disabling do_action('admin_init'); in admin.php make? I disabled this function because Whenever i was trying to insert featured image, I get 404 error, i.e. media-upload.php and ...
1
vote
4answers
591 views
Where does the 404 redirection happen?
Can someone please tell me where the 404 redirection occurs?
I am wanting to redirect to a custom template.php instead of the 404 page.
Is this possible to do? If it is can some one provide me with ...
1
vote
1answer
308 views
What causes an Unexpected HTTP Error within install plugins?
Within "install plugins" I'm receiving an error stating "An Unexpected HTTP Error occurred during the API request." When I do a plugin search it throws me back to my site's 404 page. Any idea what ...
1
vote
2answers
210 views
Form in WordPress : 404
In my WP site I've got a Contact page whose URL is mysite.com/contact/ and which contains a <form> with an action attribute set to action="/contact/"
Clicking on the submit button brings me to ...
1
vote
4answers
2k views
After server migration only the homepage works
I have recently changed hosting of my WordPress site to VPS.net. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of ...
1
vote
3answers
651 views
Categories not working - 404 Not found error
I have a community blog at thelazy.info . All things are working except the category. When you click on any category it gives 404 Not found error. I tried searching out myself but couldn't come up ...
1
vote
1answer
631 views
Custom rewrite rule serves content, but returns 404 error code
I have a plugin that sets up a custom rewrite rule. I can access the short URL and the content is returned correctly, but the HTTP response is 404, Page not found.
From searching the web it seems ...
1
vote
1answer
36 views
Defining a custom 404 for non-WordPress parts of site
I have a site with WordPress located in a directory under the root. The root directory contains the main files for the non-WordPress part of the site. Wordpress is included in all of these pages by ...
1
vote
1answer
300 views
Check if post is in draft or pending review?
Each of our posts are reviews for individual games and we occasionally have to 'pause' the game by changing it from published to pending review. The problem is if the page is indexed by search ...
