|   Uncategorized

WordPress Hints and Hacks

Pagination – in order to add pagination to lists of posts: Add this code to functions.php: function paginate() { global $wp_query, $wp_rewrite; $wp_query->query_vars[‘paged’] > 1 ? $current = $wp_query->query_vars[‘paged’] : $current = 1;   $pagination = array( ‘base’ => @add_query_arg(‘page’,’%#%’), ‘format’ => ”, ‘total’ => $wp_query->max_num_pages, ‘current’ => $current, ‘show_all’Read More