Pagination of RSS2 feed
You want to use paged not page in the request and it should work. You can find more information about WordPress pagination paged parameter here.
You want to use paged not page in the request and it should work. You can find more information about WordPress pagination paged parameter here.
EDIT – WORDPRESS 4.4.1 BUG Please take note that there is a bug in WordPress 4.4.1 (I’m not sure if this bug also influence WordPress 4.4, but according to the bug report, it does not) which fails pagination when setting a page as static front page. Be sure to check out the bug report (trac … Read more
EDIT – Now that 4.4 is out, you should use the content_pagination filter. See birgire’s answer below. You can add formatting to raw post content by applying the content filters directly to $post->post_content: echo apply_filters( ‘the_content’, $post->post_content ); This will bypass pagination by not using the get_the_content function, which is what the_content uses internally to … Read more
Try the Lazy Load plugin — its code is said to be used on WordPress.com VIP sites, and the plugin is pretty current (last updated July 4th). Caution! Lazy loading images is tricky on slow connections, where there’s a chance that images fail to load at all. Even a small bug or incompatibility in the … Read more
To be able to order by category, you have to intercept the MySQL Query. Start with pre_get_posts: add_action(‘pre_get_posts’,’setup_my_query_interception’); function setup_my_query_interception($query){ if(!is_admin() && $query->is_home() && $query->is_main_query()){ add_filter( ‘posts_clauses’, ‘order_by_category_intercept_query_clauses’, 20, 1 ); } } Now we enhance the MySQL Query to include the term and taxonomy tables: function order_by_category_intercept_query_clauses($pieces){ global $wpdb; $pieces[‘join’].=” LEFT JOIN $wpdb->term_relationships trt … Read more
How to load paginated post pages via ajax
i’ve used wp_list_comments like this: <?php if (class_exists(‘Walker_Comment_Wink’)) $walker = new Walker_Comment_Wink(); else $walker=””; wp_list_comments(array(‘walker’ => $walker, ‘type’ => ‘comment’ , ‘callback’ => ‘theme_comment2’)); ?> i used the plugin http://winkpress.com/articles/fix-reversed-comments-pagination/ to fix the “* and 1 comment” weirdness. You have the option to pass $reverse_top_level (boolean) (optional) Setting this to true will display the most … Read more
Just inspect the current post content for <!–nextpage–>: function wpse_check_multi_page() { $num_pages = substr_count( $GLOBALS[‘post’]->post_content, ‘<!–nextpage–>’ ) + 1; $current_page = get_query_var( ‘page’ ); return array ( $num_pages, $current_page ); } On page 2 of 3 that returns: Array ( [0] => 3 [1] => 2 ) On an unpaged post it returns: Array ( … Read more
WordPress 4.0 allowed you to specify multiple orderby parameters and set the order of each independently. How to do it? Just make multiple refferences, here is one way to do that. $args = array( ‘orderby’ = > array( ‘title’ => ‘ASC’, ‘date’ => ‘DESC’, ) ); Learn more here… But only since WordPress 4.2 it … Read more
Do you have the “paged” parameter in the URL of the page(s) that you are trying to use get_query_var with? As far as I know get_query_var(“paged”) is explicitly returning the value of the URL param so you need to have a URL like this for it to work: /?paged=7 Alternatively you could read the URL … Read more