CMS & WordPress
I have a baffling problem I've never encountered before.
I'm developing a new Wordpress website, doing almost everything I've done a dozen times before on the same server, but somehow I'm getting a 404 error when trying to view Posts. And only posts. Pages work fine. And here's the baffling part, it's different across the browsers! Why should a server configuration error be browser-specific?
It seems I could view my single Posts just fine on Firefox, but on Internet Explorer, Chrome and Android Mobile, I'm getting the 404s.
I have a single.php file made.
I tried uploading the site to a different server. I tried re-saving the Permalinks settings inside of Wordpress. I tried manually deleting and retyping the .htaccess file. I tried copying a working .htaccess file from another website.
I even tried going back to the default Permalinks setting, which, maddeningly, doesn't work either! Somehow the Pages are still working cross-browser just fine (website.com/index.php?page_id=123) but still getting 404s in IE, Chrome, mobile when trying to view Posts (website.com/index.php?p=123)!
argh! I have no idea what to do!
Any further suggestions anyone?
What might the problem be? And why would it be different across browsers?!
Wait! I know what's wrong!
For this website I'm using Posts in a different way than I'm used to; Which is all of the Posts represent upcoming events and therefore have future dates.
Therefore, when trying to view a single Post that Wordpress thinks is scheduled (therefore not yet published) while not logged in, it'd return a 404 error. The reason it's been showing on Firefox? I'm logged into Wordpress on Firefox.
So now what I really need to figure out is how to force Wordpress to display those schedules Posts!
aha! Here we go. A plugin that changes the status of scheduled posts from 'future' to 'published'.
- Thanks for your help, Shaun.
Glad you two got it sorted.
The links for Scheduled posts shouldn't be getting shown until they're Published (except in the ACP), no?
It's a website about hiking and to make things more user-friendly for the administrator, I renamed 'Posts' to 'Hikes' and wanted to use the publish date as the date for when the events are carded.
I'd originally found a way to make wp_query display links to the future posts like this:
// Create WP_Query
$args = array(
'category_name' => 'my-category',
'post_status' => 'future',
'orderby' => 'date',
'order' => 'ASC',
'posts_per_page' => 3
$my_query = new WP_Query($args);
Although I need to throw that out now that I have that plugin installed (linked above).
The 'post_status' on the database for scheduled posts is now no longer 'future', so I'll have to find some way to search records by the date instead.
This topic is now closed. New replies are no longer allowed.