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

Add anchor tag on previous_image_link / next_image_link

i’m usig the code for create a link (next and prev) $attachments = array_values( get_children( array( ‘post_parent’ => $post->post_parent, ‘post_status’ => ‘inherit’, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘order’ => ‘ASC’, ‘orderby’ => ‘menu_order ID’ ) ) ); foreach ( $attachments as $k => $attachment ) : if ( $attachment->ID == $post->ID ) break; endforeach; … Read more