WP_Query doesn’t accept Category ID

If your category is custom taxonomy you’ll have to use tax_query in you WP_Query(). See: https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters I guess it’s a typo that you have &catid instead of $catid. Edit: Something like: $args_query = array( ‘posts_per_page’ => 6, ‘post_type’ => ‘video’, ‘tax_query’ => array( array( ‘taxonomy’ => $taxonomy, ‘field’ => ‘term_id’, ‘terms’ => $catid ) ) … Read more

Query only title/field/featured media of posts [closed]

You can make query like this $paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; $args = array( ‘post_type’ => ‘post’, //Specyfying post type ‘cat’=> 1, //Selecting post category by ID to show ‘posts_per_page’ => 10, //No. of posts to show ‘paged’ => $paged //For pagination ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) … Read more

Navigate to external link if last page or post in a category

Since it’s not clear exactly what you need it’s hard to give you the best solution. However … You should be able to use get_next_posts_link() in your loop template. Or get_previous_posts_link() if that’s what you want. If that returns null you can then echo a link to whereever you want in your template. if(!get_next_posts_link()) { … Read more