Would be nice if the plugin supported WP-PageNavi.
I've added this to posts-for-page.php:
if( function_exists('wp_pagenavi')) {
$output .= wp_pagenavi( array( 'echo' => false) );
} else {
if($_opts['cur_page'] > 1) {
$output .= "<span class='pfpNav'>" . get_previous_posts_link($_opts['prevText']) . "</span>";
}
if($_opts['cur_page'] < $page_links_total) {
$output .= "<span class='pfpNav'>" . get_next_posts_link($_opts['nextText']) . "</span>";
}
}
http://wordpress.org/extend/plugins/posts-for-page/
sihibbs
Member
Plugin Author
Posted 6 months ago #
Ok thanks for the input looks good, I will look into including it into the next release.
sihibbs
Member
Plugin Author
Posted 5 months ago #
Ok this has gone onto the list of update requests.
Hello! I tried the plugin and it looks great, but I need the PageNavi to work... I haven't tested out the above code yet, does it work well? Is the next update coming up anytime soon? If I use the code above before updating the plugin, will I get two paginations whenever the update comes out?
Thank you both, and great plugin! Will rate five star!
productioncat
Member
Posted 1 month ago #
I add the same code to posts-for-page.php
But why my pagination always leads to the same page (first page).
Here is the link.
http://www.niagarafreefun.ca/niagara-events-complete-list/
Thanks.
productioncat
Member
Posted 1 month ago #
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
global $wp_query;
$page_links_total = $wp_query->max_num_pages;
if( function_exists('wp_pagenavi')) {
$output .= wp_pagenavi( array( 'echo' => false) );
}
else {
if($_opts['cur_page'] > 1) {
$output .= "<span class='pfpNav'>" . get_previous_posts_link($_opts['prevText']) . "</span>";
}
if($_opts['cur_page'] < $page_links_total) {
$output .= "<span class='pfpNav'>" . get_next_posts_link($_opts['nextText']) . "</span>";
}
}
wp_reset_query();
return $output;
}
productioncat
Member
Posted 1 month ago #
It's fixed by putting short code on a page instead of on a post. But Another thing comes up. How to let pagination shows both on the top and at the bottom? Currently, I use wp_paginate on the POSTS FOR PAGE plugin, and it only shows on the top of the page.
I was able to get my pagination to look like wp-pagenavi, but it is always still leading to the first page. Can someone please walk me through how to fix this issue? I have the shortcode on my homepage...
gigglelounge.net