Pagination not working
-
he pagination for my custom made pages is not working. It works for my front page, and as well for category and tag pages. But when you click, say, the boxed number two at the bottom of my custom pages, while it displays a number 2 in the URL when the page loads, it still loads the same posts from page one. I had this custom made so I can input addition content into a header margin at the top, where from the posts cascade.
Here is an example page: http://www.phillybroadcaster.com/eats/
And here is the code for it:
<?php
/*
Template Name: Eats
*/
?><?php get_header(); ?>
<div id=”wrapper”>
<div id=”main”>
<div class=”post”>Welcome to our Eats Page
</div><?php query_posts(‘cat=5&posts_per_page=20’); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?><div class=”post” id=”post-<?php the_ID(); ?>”>
<h3>” rel=”bookmark” title=”<?php printf(__(‘Permanent Link to %s’,’vivathemes’), the_title_attribute(‘echo=0’)); ?>”><?php the_title(); ?></h3>
<div id=”audata”> <?php the_author_posts_link(); ?> <?php the_time(‘ F jS, Y’) ?> <?php comments_popup_link(__(‘No Comments’,’vivathemes’), __(‘1 Comment’,’vivathemes’), __(‘% Comments’,’vivathemes’)); ?> </div><div class=”entry”>
<div class=”post-thumbnail”><?php if ( has_post_thumbnail() ) the_post_thumbnail( ‘thumbnail’ ); ?></div>
<?php the_excerpt(__(‘read more…’,’vivathemes’)) ?>
” > <?php printf(__(‘read more…’,’vivathemes’)) ; ?>
</div><div class=”postmetadata”> <?php printf(__(‘Posted in: %s’,’vivathemes’), get_the_category_list(‘, ‘)); ?> <?php edit_post_link(__(‘Edit’,’vivathemes’), ”, ‘ ‘); ?> </div>
</div>
<?php endwhile; ?>
<?php include(‘wp-pagenavi.php’); if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?>
<?php else : ?>
<p class=”center”><?php _e(‘You don’t have any posts yet.’,’vivathemes’); ?></p>
<?php endif; ?>
</div>
<?php include (TEMPLATEPATH . ‘/sidebar.php’); ?>
</div></div>
</div>
<div class=”clear”> </div>
<?php get_footer(); ?>If someone could tell me what I’m missing in this custom coding, to get the pagination to work, that would be great.
-
Hi! Sounds like a frustrating problem, but since these forums are for wordpress.com blogs (on a multiuser platform), I’m afraid we can’t help you. If you have a wordpress.org install on your own host (not wordpress.com), you can go to http://wordpress.org/support/ and look for assistance there.
BTW, it seemed to take a while for your page to load — though I am on a wireless connection that’s not super fast. You might want to reduce the number of posts per page.
-
Hey,
Thanks for the FYI, but my web site is a wordpress site. I received help on another issue from someone and it was for this same blog. I guess I’m not quite sure why I can’t receive help. I don’t mean to nag, but are you sure there hasn’t just been a misunderstanding? Really do appreciate the help. Sorry if I’m not the best at asking questions or understanding the structure here. Really glad it exists. (also, I’m reducing the number of posts per page now. Thanks for the tip).
-
mmadfan is right. Your site may be WordPress, but you need to understand that there is a HUGE difference between sites hosted by WordPress.com and self-hosted WordPress sites (which is what you have). More info on the difference:
http://en.support.wordpress.com/com-vs-org/It’s not that we don’t want to help. It’s just that you are talking to people who know apples, when in fact you are asking about oranges.
-
@gafftherisible – not to rain on your parade, but this is the only question you have ever ask here and you have had an account here for only four days. .ORG and .COM and the two forums are confused quite often.
-
Gotcha. Thank you both for clearing that up. I really appreciate the help. Would you know, then, where I could ask for help? If it’s in your protocol to cease help at this point, i understand. You’ve been really helpful already.
-
-
@gafftherisible – you want to make friends over at http://wordpress.org/support/ – bunch of nice people over there – I used to help there when I had a .ORG install.
Good luck
Some days 30% or more of the questions here are really for WordPress.ORG installs. .ORG also gets a fair number of .COM questions – that is why we try and always find out the URL of the blog in question as many times the answers are way way different –
-
Hey Guys,
Thanks so much for your instruction and help. Seriously. It means a lot. You guys do really great work. Hopefully, I’ll learn enough code someday where I’ll be able to help people out in a pinch. Thanks again! -Gafftherisibile
- The topic ‘Pagination not working’ is closed to new replies.