Check for is_main_query
on the query object.
if ( is_category( 'video' ) && $query->is_main_query() )
Related Posts:
- How to create a custom sort for WordPress categories
- Hook when category is added to post
- get_categories for custom post type with a specific custom taxonomy attached
- How to add the category ID to admin page
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Category Archive
- Exclude categories from Loop, queries, widgets, post navigation
- Filter categories using tags
- Sticky posts on home page, search, tag and archives without plugin
- WordPress 1 domain multiple blogs
- Show Post from parent category (custom taxonomy) ONLY!
- One WordPress Install, Two Categories. Each Category Gets a Domain
- Name of last category level for a post
- How to add style to category link?
- WordPress Ordering Problem. How to fix ordering 1-10-100 issue?
- Are Custom Taxonomy Templates Possible?
- Remove Categories and Tags from Admin Dashboard
- Using widget logic I want to show only a widget on the archive page if there are no posts
- Add a wordpress blog to my website having users
- Allow contributors to add categories, but not delete
- Show all posts of sub category in a page like: foo.com/category/subcategory/ using UNCODE Theme
- Replace category titles
- PHP Fatal error: Cannot use object of type WP_REST_Response as array in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
- WordPress categories being called “archives” in google links. How to remove?
- 403 forbidden on one page only
- Show recent posts from one category on a non-WP site
- Multiple Category Search
- Omit specific product categories from WooCommerce shortcode
- how to query posts and auto assign category if post title has keyword
- I want to display posts common in 3 categories [closed]
- Displaying just one new/current post per category in homepage
- How do I share categories across selected sites in a Multisite setup
- Show popular post by category code
- Drop posts from categories in MySql
- Categories in admin interface: can they be collapsible?
- Equivalent to in_category() for subcategories
- query_post order desc
- Limit number of posts on a custom category template – breaking pagination
- Exclude category by slug in pre_get_posts?
- list categories based on updated posts [closed]
- How to show 5 posts from specific category on related page?
- How can I only display one link rather than many?
- Hierarchical permalink structure for posts showing categories and sub-categories
- how i can hide some category from author admin panel?
- Display posts from a category
- Exclude category from related post
- Post belonging to many categories
- how do I use the walker class to display categories in their correct heirarchy?
- WP 4.7 in_category change?
- display category list year wise in wordpress
- Echo show_count of categories separately without using wp_list_categories
- Two Sections on Woocommerce Catergory Page [closed]
- Display subcategories in dropdown
- Illegal string offset ‘taxonomy’ in
- Are term_taxonomy_id and term_id the same? [duplicate]
- Display all sub category but one
- Let user select their own category
- Filter Category Loop Dynamically
- SQL query to get posts from multiple categories but not in a category
- Can each user have only access to a private area (his own categories and posts)?
- Pagination breaks on child-categories, works fine on parent-category
- WP Category Meta plugin fix? [closed]
- WP SQL Categories Export and Import
- Category name for all posts getting assigned to a single random post
- Displaying Single Product Page Parent and Child Category
- How to display WooCommerce category image in my category page banner as a background?
- Why are my newly added categories not showing up when creating a post?
- WordPress Default Category and Custom Taxonomy Selected Attribute not Working After Searched in wp_dropdown_categories Array
- How to add the .html extension to the category?
- Order wp_dropdown_categories by ASC or DESC
- Add filter for specific category only
- How to create category filter on a blog like on the site below?
- How to exclude a category returned by get_categories from function.php?
- Wrong category in URLs accepted like the correct one
- Getting a sub category based on a category name
- How to display only sticky posts on category pages?
- Conditional statement: if is_category, append at the end of page
- How to Manage and link certain custom taxonomy?
- Store All Post Categories In Array
- How to add an “All” category to the tag cloud?
- I have many different products on my website how can I get them to display under specific categories?
- Help with SQL query, how to add taxonomie terms with value stored in options?
- /blog/ permalink prefix causes category pages to 404
- How to create an array with category ids order by the one that has the most recent post
- Display Referring Category on single post?
- Conditional statements based on custom meta value in category archives
- Placement of categories
- Categories Going to different Blog Pages?
- Display deepest post category, when post have multiple categories
- Paginate WordPress Category Pages
- Get a list of post titles and links from yootheme master theme
- How to structure Multisite sites into categories?
- Change next_post and previous_link to navigate throught parent categories only
- Template files not working for archives and categories
- Multiple Parent Category URLs
- Excluding cateory not working on my site. how to solve this? [closed]
- Get all first images of posts in same category
- What defines a post as portfolio page content?
- Taxonomy term RestApi data 10 rows limitions
- how to create a page that shows all of multiple category posts on a single page
- Quick Edit on taxonomy names results in error