Categories
CMS Mastering Development Wordpress

WordPress pagination problem on merged queries

I have merged queries in search.php with custom post types. This is my scenario when user search to "math", the main query is searching in the post title, post excerpt, and post content. Now I have a "math" category but the post information is not including "math" text which exists in the math category so […]

Categories
Mastering Development

Pagination not working while using custom query

I have a website where On the home page I show all the posts of the website but now the requirement is to show all the posts excluding 3 Categories, but when I updated my WP_Query accordingly, Now Pagination started showing posts in loop, so Right now I am showing 12 posts in one page, […]

Categories
CMS Mastering Development Wordpress

Pagination doesnt show numbers

My code doesnt show numbers in custom post type archieve page.Also I tried many pagination code ( all of similar ) and they didnt work for in any page. So, what’s the problem? How can I show numbers? There is only a few post, so I want to show 1(one) character if there is no […]

Categories
CMS Mastering Development Wordpress

Custom Post Type Pagination getting 404 error

function viewevnts() { ob_start(); $query = ( get_query_var( ‘query’ ) ) ? get_query_var( ‘query’ ) : 1; $args = array( ‘post_type’ => ‘events’, ‘category_name’ => ‘en-events’, ‘posts_per_page’ => 5, ‘query’ => $query ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); // CPT content endwhile; $big = 999999999; echo paginate_links( array( […]