- This topic is empty.
-
AuthorPosts
-
November 12, 2010 at 12:37 pm #26855lukewildeMember
I have tried using a few guides for pagination but i can’t get any of them to even display the page numbers which i just don’t understand… So i have resorted to trying out a plug in, which atleast shows the page numbers, but when you click on page 2 it does nothing. Can anyone either help me get pagination working without this plug in or get this plug in to actually work?
November 12, 2010 at 10:07 pm #76138cybershotParticipantdoesn’t wordpress have it’s own pagination? Have you tried the template tags? if the plugin you are using doesn’t work, try a different one. There are lots of them. I don’t know how to help you without you giving access to your site. unless you post code
November 15, 2010 at 1:50 pm #75784lukewildeMemberBlog
$args = array(
'paged' => $paged,
'posts_per_page' => 5,
'caller_get_posts' => 0,
);
query_posts('cat=-5');
if (have_posts()) :
while (have_posts()) :
the_post(); ?>Woops...
Sorry, no posts were found.
Thats the code for the blog page, been trying to find answers for pagination since i started learning wordpress and haven’t found anything that works, or explains it in detail.
November 15, 2010 at 1:55 pm #75567cybershotParticipantin your code, you have query_posts(‘cat=-5’);
I think it should be query_posts(‘cat=5’);
November 15, 2010 at 1:56 pm #75568cybershotParticipantp.s also check out the codex for more on this
November 15, 2010 at 1:59 pm #75569lukewildeMemberIf i change it to just 5 no posts show
November 15, 2010 at 2:00 pm #75570cybershotParticipantwhat version of wordpress are you using?
November 15, 2010 at 2:01 pm #75571cybershotParticipantalso, how many posts do you have in the category?
November 15, 2010 at 2:03 pm #75572lukewildeMemberi have 7 posts in the category, and it is the latest version
November 15, 2010 at 2:04 pm #75573cybershotParticipantso you see five posts but no pagination?
November 15, 2010 at 2:08 pm #75574cybershotParticipanttry moving your
up before the
wp_link_pages must be inside the loop. maybe it’s not executing where you have it?
November 15, 2010 at 2:17 pm #75575lukewildeMembertried moving that as well as to different places, and still not working, if i put it before the endwhile; else then the page numbers show after every post and still doesnt work.
November 15, 2010 at 2:26 pm #75510cybershotParticipantat this point, I would try a different loop
try that loop above. You can see the if(in_category(5)) part of the loop. Try it and see if it works. If it does, you can modify it to show the amount of posts that you wantNovember 15, 2010 at 2:59 pm #75421lukewildeMemberthat loop showed the posts, but it just done what it was doing before, when i click page 2 it just changes the URL and not the posts.
November 15, 2010 at 3:27 pm #75422cybershotParticipantyour problem is in here
$args = array(
'paged' => $paged,
'posts_per_page' => 5,
'caller_get_posts' => 0,
if you check the url after clicking on the two, you can see the address is wrong. I don’t know how to fix it for you. Sorry
AuthorPosts- The forum ‘CSS’ is closed to new topics and replies.