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

Single post navigation Previous post link shows up but Next post link doesn’t

Ok this issue was very hard to get fixed. I finally found the solution: Above <?php if (have_posts()) : ?>: insert: <?php $max_entries_per_page = 0; $current_page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 0; query_posts(“category_name=mobiliario&showposts=1&paged=” . $current_page) ?> Bellow <?php endwhile; ?>: insert: <div class=”pagination”> <div class=”pagnext”><?php next_posts_link(‘—›’, $max_entries_per_page) ?></div> <div class=”pagprev”><?php previous_posts_link(‘‹—’, $max_entries_per_page) ?></div> </div> I … Read more

single post navigation order (NOT chronological)

after a lot of trial and error WP transients came to save me!! here is the solution for anyone that might need this… in the index.php (outside the main loop) i save the current random order in a transient: $order_array = array(); while ( $the_query->have_posts() ) : $the_query->the_post(); $order_array[] = get_the_ID() ; endwhile; set_transient(‘post_order’, $order_array, … Read more