Exactly where I have to insert get_next_post_link() in a post?

When you develop a theme you can add specific styling per each post type. by default they all use the single.php theme file, but single-{post-type}.php will be used for the specific post type being displayed (for the full template hierarchy – https://developer.wordpress.org/themes/basics/template-hierarchy/#the-template-file-hierarchy) The navigation links like the prev and next ones you are trying to … Read more

pagination/prev and next page links not showing

OK, it seems that we have two errors here: You should use posts_nav_link() instead of previous_post_link() and next_post_link(). The functions you used point to previous/next posts, not pages. You can refer to the WordPress Codex for more information. You should place posts_nav_link() after endwhile so that it is not repeated for every single post excerpt … Read more

how to add previous and next link for the posts?

Here’s a good place to start: http://codex.wordpress.org/Template_Tags/previous_post_link http://codex.wordpress.org/Template_Tags/next_post_link As you will see, keeping the links to posts of the same category is as simple as setting an argument in the function. I would give an example but there are really good examples on the pages linked above.

How to add a class and title attribute to the link generated by next/previous post

previous_post and next_post are deprecated. you should be using previous_post_link and next_post_link. That function applies the {$adjacent}_post_link filter. You can use that to get what you want. A very, very crude example: function construct_np_attr_wpse_92086($matches) { if (‘prev’ == $matches[1]) { $np = ‘Previous’; } else { $np = ‘Next’; } $ret=”rel=””.$matches[1].'” class=”normalTip” ‘; if (!empty($np)) … Read more