require('./wp-load.php');
global $query_string;
query_posts($query_string.'&orderby=date&order=DESC');
while ( have_posts() ) : the_post();
echo '<div class="pwrap">';
echo '<div class="ptitle">'.the_title('','',false).'</div>';
echo '<div class="pcontent">'.get_the_excerpt().'</div>';
echo '<div class="pfooter">'.get_the_date().' '.get_the_time().'</div>';
echo '</div>';
endwhile;
echo '<div style="width:100%;text-align:center;">';
posts_nav_link(' · ', 'previous page', 'next page');
echo '</div>';
wp_reset_query();
?>
results in same posts on all pages and only one link showing on both.
require('./wp-load.php');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('&orderby=date&order=DESC&paged='.$paged);
while ( have_posts() ) : the_post();
echo '<div class="pwrap">';
echo '<div class="ptitle">'.the_title('','',false).'</div>';
echo '<div class="pcontent">'.get_the_excerpt().'</div>';
echo '<div class="pfooter">'.get_the_date().' '.get_the_time().'</div>';
echo '</div>';
endwhile;
echo '<div style="width:100%;text-align:center;">';
posts_nav_link(' · ', 'previous page', 'next page');
echo '</div>';
wp_reset_query();
?>
results in same posts on multiple pages also only one link showing.
require('./wp-load.php');
query_posts('&orderby=date&order=DESC&paged='.$_REQUEST['paged']);
while ( have_posts() ) : the_post();
echo '<div class="pwrap">';
echo '<div class="ptitle">'.the_title('','',false).'</div>';
echo '<div class="pcontent">'.get_the_excerpt().'</div>';
echo '<div class="pfooter">'.get_the_date().' '.get_the_time().'</div>';
echo '</div>';
endwhile;
echo '<div style="width:100%;text-align:center;">';
posts_nav_link(' · ', 'previous page', 'next page');
echo '</div>';
wp_reset_query();
?>
results in accurate posts display, but only one link shows on both pages and both go to the last&own page on both.
I'm embedding wordpress in a layout and just need pagination to work for indexing blog posts by date. Non of the published 'fixes' work on 3.2.1. Needing a solution for an embedding scenario.
Thanks