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 […]
Tag: get_pagenum_link( $big ) )
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, […]
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 […]
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( […]