How to Show Next-Previous Link Only

I can not figure out how to keep Next and Previous links only and remove page number links. I also tried using this: previous_post_link(); next_post_link(); But it's not working. While using the following page templates to display all comments on the website: <?php /* Template Name: Display All Comments Template Post Type: page Author: www.theidioms.com */ ?> <?php get_header(); ?> <div class="blocks main-block"> <div class="article"> <h1 id="title" class="page-heading"><?php the_title(); ?></h1> <?php /*Set how many comments per page*/ $comments_per_page=4; /*Count comments …
Category: Web

Sort post comments from newest to oldest in pagination

I searched for a whole day before asking this question, but couldn't find anything to help me. How can I sort the comments on all my posts from most recent to oldest? I made a custom theme and that's why I'm asking. This is my setting in Settings > Discussion: And this is my code in comments.php: <?php if ( have_comments() ) : ?> <!-- Numero commenti --> <span class="numero-commenti"> <?php if(!is_page('testimonianze')){ printf( _nx( '<span class="numero">1</span> Commento <hr class="linea"><a href="#respond">Lascia …
Category: Web

Enable comments for custom template page

We use careerfy theme WordPress which is a system for a job board. I would like to enable comments for each job post page, these pages are not listed on the WordPress admin panel, I can access it via child theme only, in this path: (wp-content/themes/careerfy-child-theme/wp-jobsearch/detail-pages/job/view3-job.php) I have tried to add a shortcode but it seems not working.
Category: Web

Set noindex page-comment from Pages 2, 3 and More?

I use All in one seo pack plugin. I see that Google indexed page comments (that are a pages generated from paginated comments). The example url are the followings: URL canonical - mydomain.com/url-canonical URL comment page - mydomain.com/url-canonical/comment-page-3 The problem is that 'URL comment page' has itself as canonical, and not the main page. I'd like to set as noindex all comment-page for all postes. Is it possible? I see that AIO SEO has aioseo_filter_robots_meta, but I do not understand …
Category: Web

Comment Pagination Behavior wp_list_comments() - comment ordering and pagination

I am using wp_list_comments with a callback function to display a list of all comments, and it's working well. I am then using paginate_comments_links to create pagination links, which is also working well. My issue is with comment ordering and pagination. In the WordPress discussion settings, I have... Break comments into pages with 10 top level comments per page and the last page displayed by default Comments should be displayed with the newer at the top of each page. And …
Category: Web

return paginate_comments_links() as array

The documentation specifies: type (string) (optional) Controls format of the returned value. Possible values are: 'plain' - A string with the links separated by a newline character. 'array' - An array of the paginated link list to offer full control of display. In order to add twitter bootstrap pagination styling to the wordpress comments pagination, I want to have the return be an array. When I add $args to the call, i get no return. My Code: <ol class="commentlist" style="list-style: …
Category: Web

How to check if post has previous_comments_link() and next_comments_link()

I'm using the following code for comments pagination (based on 2014 theme) <?php if( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <ul class="pager"> <li class="previous"> <?php previous_comments_link( __( '← Older Comments', '' ) ); ?> </li> <li class="next"> <?php next_comments_link( __( 'Newer Comments →', '' ) ); ?> </li> </ul> <?php endif; ?> I noticed that if I'm on the first page, the .previous list item is still in the DOM. It's empty but still there. <li …
Category: Web

Customizing comments pagination for bootstrap

I want to customize the comments pagination to support Bootstrap, I have these lines in my theme file but I need more customization to display Bootstrap pagination style <?php the_comments_pagination( array( 'prev_text' => '<i class="fa fa-arrow-right" aria-hidden="true"></i><span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>', 'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span><i class="fa fa-arrow-left" aria-hidden="true"></i>', ) );
Category: Web

Aggregate comments, with pagination

I want to build a page that would display all comments, regardless of which post they're attached to. I also want that page to be paginated, since it'll potentially have 10,000+ comments. I'm not sure how to go about it, but here are some of the functions I've studied so far: get_comments - If no post_id is passed in, it'll return all comments. However, I don't see a way to paginate these (there are offset and number options to fiddle …
Category: Web

Paginated Comments “reply” does not work!

I use plugin Paginated Comments. I edit template and CSS in paginated-comments.php but "reply" does not work. "reply" does not appear at all. http://i.imgur.com/ieIeadO.jpg (There should be a button to reply). Code full: http://pastebin.com/70Aq4fEQ What is problem? Help me please, thanks <div id="respond"> <h3><?php comment_form_title( __('Yorum Yap', 'wpzoom' ), __('Leave a Reply to %s', 'wpzoom')); ?></h3> <div class="cancel-comment-reply"><p><?php cancel_comment_reply_link(); ?></p></div> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p><?php _e('You must be', 'wpzoom') ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php …
Category: Web

pagination custom post type on CP page

I know that there are a lot of topics on this question and I've read a lot of them and tried different things. But pagination is still not working. I think it has something to do with the permalink settings. The situation I have a custom post type called artists which I link to events. On the artist page I show all the events the artist is linked to (they're linked using the posts 2 posts plugin). I'd like to …
Category: Web

paginate_comments_links() not working

I'm using paginate_comments_links() to get all the comments by the current user: <?php global $current_user; get_currentuserinfo(); $userid = $current_user->ID; $args = array( 'user_id' => $userid, 'number' => 2, ); $comments = get_comments($args); foreach($comments as $comment) : echo('<br />' . $comment->comment_date . '<br />' . $comment->comment_content); endforeach; paginate_comments_links(); ?> However, the pagination is not showing up. I have posted 7 comments, so I expected to see 2 comments per page, 4 pages in total. However, no pagination is showing up at …
Category: Web

How can I see all of a post's comments on a single page as a reader, if pagination is enabled?

Is there an URL I can access, or an argument that can be passed, to disable pagination on the reader's side? The blog uses standard Wordpress comment pagination, i.e., http://example.com/2012/01/post-title/comment-page-1/ I'd like to be able to reformulate the URL into something like http://example.com/2012/01/post-title/all-comments
Category: Web

Reverse comment pagination numbers

I would like to reverse the comment pagination numbers so that the newest comments show on page 1 instead of the last page. I did an array_reverse for the comments_array and set the Wordpress Discussion Settings to first page displayed by default - everything works fine except when someone leaves a comment it doesn't take in consideration the array_reverse and it takes the user to the link where the comment would be without the array reverse and obviously the comment …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.