Author Archive for zeo

19 Apr 2010

WordPress: Display the contents of static page Posts page

By default, if you choose a static Page for Posts page to show your latest Posts, the original content of that Page will not be displayed. This is how you can display the content of the Page along with the latest Posts. Add the following lines to your WordPress Theme’s template index.php file, preferably before [...]

18 Apr 2010

WordPress: Limit posts per page

Choose and add the following lines to your WordPress Theme’s template functions.php file (For example, functions.php file for a Theme named “default” would probably reside in the directory wp-content/themes/default/functions.php): function limit_posts_per_page() { if ( is_category() ) return 2; else return 5; // default: 5 posts per page } add_filter(‘pre_option_posts_per_page’, ‘limit_posts_per_page’); function limit_posts_per_archive_page() { if ( [...]