Written in response to Unable to get page number with pagination plugin and query_posts:
This is all the code for the Rvoice page and Living Language Page
Rvoice page
Living Language
Rvoice page
<?php
/* Template Name: Rvoice page */
get_header(); ?>
<?php require_once('rvoice_header.php');?>
<div id="content" class="narrowcolumn">
<div id="contentContainer">
<?php
$paged = get_query_var( 'page' );
query_posts('cat=4&paged='.$paged);
if(have_posts()) { while(have_posts()) { the_post();
?>
<div class="postBox">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<span class="byAuthor">by <?php the_author_posts_link(); ?></span> <span class="date"><?php the_time('F jS, Y') ?></span><br/>
<?php the_content('');
// Check the content for the more text
$ismore = @strpos( $post->post_content, '<!--more-->');
// If there's a match
if($ismore){?>
<a href="<?php the_permalink(); ?>"
class="moreLink"><?php echo(get_option('rosetta_read_more')); ?></a>
<?php }else{
//the whole post is shown, check if position is set and if position is set, show the
//name of the author and his/her position
$author=get_the_author();
$author_id=$post->post_author;
$position=get_the_author_meta( 'rosetta_position', $author_id );
if($position){
the_author();
echo('<br/>'.$position);
}
}
?>
<div class="postInfo">
<a href="<?php the_permalink();?>/#comments" class="commentLink">
<?php comments_number(get_option('rosetta_no_comments_text'), get_option('rosetta_one_comment_text'), '% '.get_option('rosetta_comments_text'))?>
</a>
</div>
<div class="postSeparator"></div>
</div>
<?php
}
}?>
<?php if(function_exists('wp_paginate')) {
wp_paginate();
} ?>
<div class="footercenter">
Looking for more? Browse our <a href="<?php echo(get_option('rosetta_rvoice_archive'));?>">archives</a>
</div>
</div>
</div>
<?php
get_sidebar();
get_sidebar('tag_cloud_sidebar');?>
<?php get_footer(); ?>Living Language
<?php
/*
Template Name: Language Journeys page
*/
get_header(); ?>
<?php require_once('language_header.php');?>
<div id="content" class="narrowcolumn">
<div id="contentContainer">
<?php
$paged = get_query_var( 'page' );
query_posts('cat=3&paged='.$paged);
if(have_posts()) { while(have_posts()) { the_post();
?>
<div class="postBox">
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<span class="byAuthor">by <?php the_author_posts_link(); ?></span> <span class="date"><?php the_time('F jS, Y') ?></span><br/>
<?php the_content('');
// Check the content for the more text
$ismore = @strpos( $post->post_content, '<!--more-->');
// If there's a match
if($ismore){?>
<a href="<?php the_permalink(); ?>"
class="moreLink"><?php echo(get_option('rosetta_read_more')); ?></a>
<?php }else{
//the whole post is shown, check if position is set and if position is set, show the
//name of the author and his/her position
$author=get_the_author();
$author_id=$post->post_author;
$position=get_the_author_meta( 'rosetta_position', $author_id );
if($position){
the_author();
echo('<br/>'.$position);
}
}
?>
<div class="postInfo">
<a href="<?php the_permalink();?>/#comments" class="commentLink">
<?php comments_number(get_option('rosetta_no_comments_text'), get_option('rosetta_one_comment_text'), '% '.get_option('rosetta_comments_text'))?>
</a>
</div>
<div class="postSeparator"></div>
</div>
<?php
}
}?>
<?php if(function_exists('wp_paginate')) {
wp_paginate();
} ?>
<div class="footercenter">
<p class="disclosure">This site is intended for informational purposes only. This site includes commissioned and un-commissioned posts. The views and opinions expressed are solely those of the author, and do not necessarily reflect the views or policies of Rosetta Stone Ltd. ("Rosetta Stone").</p>
Looking for more? Browse our <a href="<?php echo(get_option('rosetta_living_archive'));?>">archives</a>
</div>
</div>
</div>
<?php
get_sidebar('living_language_sidebar');
get_sidebar('tag_cloud_sidebar');?>
<?php get_footer(); ?>
