Modifications to get to work with WP: Permalink, paging