tweak functions WP to add pagination on posts homepage