pagination not showing on custom query (get_results)
问题 I followed this link and created my own custom query with pagination.. but I don't really understand how the offset works, https://wordpress.stackexchange.com/questions/21626/pagination-with-custom-sql-query the pagination does not work well. and I'm getting zero value for offset. function spiciest(){ global $wpdb, $paged, $max_num_pages; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $post_per_page = intval(get_query_var('posts_per_page')); //6 $offset = ($paged - 1)*$post