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 defeat “Blog pages show at most __ posts” setting in the loop?

Instead of using the default loop, perhaps try building your own query. Basically, it’ll look something like this: $your_posts = get_posts(‘cat=123&posts_per_page=123’); foreach ($your_post as $post) { do_something-with($post); } You can display all posts by either use the param ‘posts_per_page’=>-1 or nopaging=true. (Not sure why someone voted this down? IMHO said person should comment on how … Read more

append code after the_content not working

previous_post_link and next_post_link both output the link directly, which won’t work in your case because you’re trying to assign the result to a variable. Use get_previous_post_link() and get_next_post_link() instead- function add_pagin( $content ) { if ( is_singular(‘post’) ) { $content .= get_previous_post_link() . get_next_post_link(); } return $content; } add_filter( ‘the_content’, ‘add_pagin’ );

WP_Query issues with argument posts_per_page

Try to add ‘post_type’ => ‘any’, ‘post_stauts’ => ‘any’, to your arguments and see what happens. This should retrieve posts in all post types with any post status. If it only retrieves 252 posts, then the other posts doesn’t not meet your criteria in your query. The other important thing is that with such an … Read more

Add rel to all images in a post

something like this can be useful: function image_tag($html, $id, $alt, $title) { return preg_replace(array( “https://wordpress.stackexchange.com/”.str_replace(‘//’,’//’,get_bloginfo(‘url’)).’/i’, ‘/s+width=”d+”/i’, ‘/s+height=”d+”/i’, ‘/alt=””/i’ ), array( ”, ”, ”, ‘alt=”‘ . $title . ‘”‘ ), $html); } add_filter(‘get_image_tag’, ‘image_tag’, 0, 4);