dizzyvapor
Member
Posted 9 months ago #
I am using this code on the top of my index page in order to have it display only one post per page:
<?php get_header();
query_posts('posts_per_page=1');
?>
My problem is that somehow when using that code, when I click on "Older Entries" I get a 404 Error. Well, first I get a page that looks just like the index but when I click it again, I get the 404. When I take that code out, I don't get the 404 error but it lists the 10 most recent posts, which I don't want. Here is the site I'm talking about: http://www.jqpentertainment.com/
I'd just tell it to list 1 post under the settings in wordpress but I have another page that's I need to list multiple posts on so that won't work.
dizzyvapor
Member
Posted 8 months ago #
tigtog@gmail.com
Member
Posted 8 months ago #
You should be able to use a conditional php string in your index.php file to make this work that way if you really want to.
But perhaps what would be simpler would be changing the "Older Entries" link to a "Previous Post" link? And have each single post point to both Previous and Next posts?
dizzyvapor
Member
Posted 7 months ago #
It already does link to the previous post, but it's broken when I click it.
Right now I changed it to link the the archives but I'd still like to resolve this.
jimborama
Member
Posted 5 months ago #
go to settings/reading and change the default number "blog pages show at most" from 10 to 5 or 11 or anything else I presume. It worked for me. Don't know why. For some reason it just doesn't like the default.
step_ton
Member
Posted 2 months ago #
yes. thanx jimborama. this woked for me too!
Hi,
Add this code in htaccess and have a check:
# BEGIN WordPress
<IfModule mod_rewrite.c>
ErrorDocument 404 /index.php?error=404
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Thanks,
Shane G.