Hi.
Install the plugin Settings WP-CommentNavi. All of these settings by default.
But the problem is that the page does not display correctly “Page 19 of 0”
Where is error?
fns
I’m unable to use the BAN Plugin on my website https://trailridge.co
This is hosted at WPengine.com
I’m receiving the fatal error below
Fatal error: Call to undefined function get_language_attributes() in /nas/wp/www/cluster-41920/trailridge/wp-content/plugins/wp-ban/wp-ban.php on line 287
]]>Hi,
I don’t know, if I don’t understand the plugin or if theres some bug. I haven’t changed anything at the default settings and I don’t know how to set the maximal count of shown Comments… so where can I set, for example, 5 comments for each ‘page’? Now it shows every comment and theres just a ‘Page 1 of 1 – 1’
Very thankful for any help!
]]>Hi Lester,
Numbered pagination works well (both your plugins – posts and comments) but I found one SEO problem with permalink of comments navigation (posts pagination works correctly in main loop and in taxonomy loop).
Comment plugin adds page number to permalink of each comment and if some changes be made (for example changes of comments ordering or removal of some comments) then this urls will change too. Example of comments permalink with pagination:
https://domain.com/postname/comment-page-2/#comment-492
Do you know any way how correct this problem and make permalink structure like as posts without page numbers?
Regards,
Arni
i notice on your websites comment section you have replaced the pagination with ajaxed load more comments, can you give me a heads up on how to do this?
]]>In wp-commentnavi/wp-commentnavi.php you have:
add_action( ‘plugins_loaded’, ‘polls_textdomain’ );
instead of:
add_action( ‘plugins_loaded’, ‘commentnavi_textdomain’ );
which causes an error
]]>Sorry man, didnt worked for me on my WP MU. Deactivating the plugin now.
]]>I have two PHP objects
if(function_exists('wp_commentnavi')) { wp_commentnavi(); }
which is the comment pagination
and
if(function_exists('wp_commentnavi_all_comments_link')) { wp_commentnavi_all_comments_link(); }
which is the all comments link.
I would like the second, all the comments link, to be only displayed if
a) there are more than x comments OR
b) if the comment pagination isn’t displayed neither should the all comments link.
Essentially I want to say display all comments link if there are more than x comments, if not don’t display all comments link.
Anyone know the code required to do this?
Thanks in advance!
I am currently using the plugin WP-CommentNavi for comments pagination but whenever a page is clicked it goes to the highest comments page (oldest comments). My comments are purposely displayed newest first and therefore I need the default pagination page to be 1 whenever a link is clicked.
I notice there is the same default for other pagination plugins too whereby the highest pagination page (ie if there are 5 pages) page 5 is displayed.
I can’t be sure this is the relevant code to what I am trying to achieve but I feel the answer might lie in here (below). If not, please tell me and disregard this code.
### Function: Comment Navigation: Boxed Style Paging
function wp_commentnavi($before = '', $after = '') {
global $wp_query;
$comments_per_page = intval(get_query_var('comments_per_page'));
$paged = intval(get_query_var('cpage'));
$commentnavi_options = get_option('commentnavi_options');
$numcomments = intval($wp_query->comment_count);
$max_page = intval($wp_query->max_num_comment_pages);
if(empty($paged) || $paged == 0) {
$paged = 1;
}
$pages_to_show = intval($commentnavi_options['num_pages']);
$pages_to_show_minus_1 = $pages_to_show-1;
$half_page_start = floor($pages_to_show_minus_1/2);
$half_page_end = ceil($pages_to_show_minus_1/2);
$start_page = $paged - $half_page_start;
if($start_page <= 0) {
$start_page = 1;
}
$end_page = $paged + $half_page_end;
if(($end_page - $start_page) != $pages_to_show_minus_1) {
$end_page = $start_page + $pages_to_show_minus_1;
}
if($end_page > $max_page) {
$start_page = $max_page - $pages_to_show_minus_1;
$end_page = $max_page;
}
if($start_page <= 0) {
$start_page = 1;
}
if($max_page > 1 || intval($commentnavi_options['always_show']) == 1) {
$pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $commentnavi_options['pages_text']);
$pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
echo $before.'<div class="wp-commentnavi">'."\n";
switch(intval($commentnavi_options['style'])) {
case 1:
if(!empty($pages_text)) {
echo '<span class="pages">'.$pages_text.'</span>';
}
if ($start_page >= 2 && $pages_to_show < $max_page) {
$first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $commentnavi_options['first_text']);
echo '<a href="'.clean_url(get_comments_pagenum_link()).'" class="first" title="'.$first_page_text.'">'.$first_page_text.'</a>';
if(!empty($commentnavi_options['dotleft_text'])) {
echo '<span class="extend">'.$commentnavi_options['dotleft_text'].'</span>';
}
}
previous_comments_link($commentnavi_options['prev_text']);
for($i = $start_page; $i <= $end_page; $i++) {
if($i == $paged) {
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $commentnavi_options['current_text']);
echo '<span class="current">'.$current_page_text.'</span>';
} else {
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $commentnavi_options['page_text']);
echo '<a href="'.clean_url(get_comments_pagenum_link($i)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
}
}
next_comments_link($commentnavi_options['next_text'], $max_page);
if ($end_page < $max_page) {
if(!empty($commentnavi_options['dotright_text'])) {
echo '<span class="extend">'.$commentnavi_options['dotright_text'].'</span>';
}
$last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $commentnavi_options['last_text']);
echo '<a href="'.clean_url(get_comments_pagenum_link($max_page)).'" class="last" title="'.$last_page_text.'">'.$last_page_text.'</a>';
}
break;
case 2;
echo '<form action="'.admin_url('admin.php?page='.plugin_basename(__FILE__)).'" method="get">'."\n";
echo '<select size="1" onchange="document.location.href = this.options[this.selectedIndex].value;">'."\n";
for($i = 1; $i <= $max_page; $i++) {
$page_num = $i;
if($page_num == 1) {
$page_num = 0;
}
if($i == $paged) {
$current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $commentnavi_options['current_text']);
echo '<option value="'.clean_url(get_comments_pagenum_link($page_num)).'" selected="selected" class="current">'.$current_page_text."</option>\n";
} else {
$page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $commentnavi_options['page_text']);
echo '<option value="'.clean_url(get_comments_pagenum_link($page_num)).'">'.$page_text."</option>\n";
}
}
echo "</select>\n";
echo "</form>\n";
break;
}
echo '</div>'.$after."\n";
}
}
In short I need, anytime a page is clicked, for the comments pagination to be on page 1, not the highest page available. Just so you know I have tried the discussion settings on the wordpress dashboard. Nothing on google either!
Hope I have been clear in my question!
Thanks in advance, Paul
]]>I have downloaded WP-CommentNavi and also saw that on another pagination plugin (WP-PageNavi) that there is a WP Visual Pagination add on with a better CSS. I am trying to implement the black one (screenshot 1 from the WP Visual Pagination screenshots) into WP-CommentNavi. Is there a way to do this?
Thanks in advance,
Paul
It just does not display anything, the function returns null.
]]>