you are already getting the paged parameter – next step is to try and integrate it into the query:
<?php query_posts('orderby=date&order=ASC&paged='.$paged'); ?>
hope this works, good luck 😉
Thanks alchymyth.
It didn’t work.
<?php query_posts("cat=10orderby=date&order=ASC&paged='.$paged'"); ?>
And I click on page 2 but it’s still on page 1.
there is a small error in your line (no & after ‘cat=10’):
<?php query_posts("cat=10orderby=date&order=ASC&paged='.$paged'"); ?>
should be:
<?php query_posts("cat=10&orderby=date&order=ASC&paged='.$paged'"); ?>
however, i am not sure if that would influence the pagination.
there seems to be two lines with ‘query_posts’ in your code:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=10&showposts=3&paged=$paged");
?>
<?php query_posts('orderby=date&order=ASC'); ?>
<?php global $more; $more = 0; ?>
<?php if (have_posts()) : ?>
compact them into one line:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
<?php query_posts("cat=10&orderby=date&order=ASC&paged='.$paged'"); ?>
<?php global $more; $more = 0; ?>
<?php if (have_posts()) : ?>
hope this works.
Thanks alchymyth!
I have done what you suggested and still not working.
<div id="main-content">
<div id="englishsostop">
<div id="submit-a-photo"><a href="http://www.singanista.com/demosite/raise-english-s-o-s-photo-submission/"><h2>SUBMIT A PHOTO!</h2></a></div>
</div>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
?>
<?php query_posts("cat=10&orderby=date&order=ASC&paged='.$paged'"); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php $customFieldName = get_post_meta($post->ID, 'Name', true); ?>
<div id="votebox"><?php if(function_exists('the_ratings')) { the_ratings(); } ?></div>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div id="post-height-engsos"><div class="alignleft"><?php the_post_thumbnail('index-post-thumbnail'); ?></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> by <?php echo $customFieldName; ?>
<p class="cat-tag">CATEGORIES: <?php the_category(', ') ?> | <?php the_tags('TAGGED: ', ', ', ''); ?> | <?php the_time('F jS, Y') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <!-- by <?php the_author() ?> --></p>
<div class="more-link"><?php the_content('<br />(READ MORE...)'); ?></div>
</div>
</div>
<?php endwhile; ?>
<?php if (next_posts_link() || previous_posts_link()): ?>
<?php next_posts_link('« Older Entries') ?> | <?php previous_posts_link('Newer Entries »') ?>
<?php endif ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
<?php else : ?>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
Any other ideas?
The pagination still did not work. I click on page 2 and the page shows me page 1 still.