WordPress Single Post Pagination Numbered and Navigational
WordPress Single Post Pagination Numbered and Navigational
WordPress Single Post Pagination Numbered and Navigational
Making the following changes to the CPT registration, and then flushing permalinks, solved the issue: Changed the rewrite slug to ‘faq’ Changed ‘has-archive’ to true instead of ‘faq’ I did #1 so that my archive page URL would still be /faq, and the side effect is that the single questions are now faq/question-name instead of … Read more
404 page not found on pagination in home page while navigating to next page
I’d do it like this: (see the // comment here in the code) // Wrap the AJAX call to `test_function` in a `function`. function ajaxTestFunction( page_num ) { if (jQuery(‘#telegram_chk’).is(“:checked”)) var telegram=””; else var telegram=”facebook”; if (jQuery(‘#twitter_chk’).is(“:checked”)) var twitter=””; else var twitter=”twitter”; if (jQuery(‘#eth_chk’).is(“:checked”)) var eth=””; else var eth=”ethereum”; if (jQuery(‘#xml_chk’).is(“:checked”)) var xml=””; else var … Read more
function wpse_disable_pagination( $query ) { if( $query->is_single() && $query->is_page() ) { $query->set( ‘nopaging’ , true ); } } add_action( ‘pre_get_posts’, ‘wpse_disable_pagination’ ); NOTE: nopaging (boolean) – show all posts or use pagination. Default value is ‘false’, use paging.
Pagination on a underscore custom theme
I added the following to my functions.php file and it worked: function toolset_fix_custom_posts_per_page( $query_string ){ if( is_admin() || ! is_array( $query_string ) ) return $query_string; $post_types_to_fix = array( array( ‘post_type’ => ‘news_article’, ‘posts_per_page’ => 6 ), // add another if you want /* array( ‘post_type’ => ‘movie’, ‘posts_per_page’ => 2 ), */ ); foreach( $post_types_to_fix … Read more
WordPress does this for you. You shouldn’t need a custom Page template or custom query and pagination. Just set ‘has_archive’ to true when registering the post type. Then you automatically get /episodes and /episodes/page/X. Then you just need to create archive-afleveringen.php for the template, and in that template use the functions for the main query: … Read more
How to insert content before pagination in loop?
Thanks to Milo’s comment I could find a solution. In my home.php I have deleted the custom query and inserted: <div class=”news-content col-12 col-xl-8″> <div class=”row”> <h1>News</h1> </div><!– .row –> <div class=”row”> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); if(has_post_thumbnail()) :?> <div class=”news-wrapper col-12 col-xl-6″> <div class=”news-date”> <?php the_time(‘j.m.Y’); ?> … Read more