You need to edit line 7.
'category__and' => array(117,123),
The category__and parameter doesn’t use a string for the category IDs. Write the array like this:
'category__and' => array(
'117',
'123'
)
);
Related Posts:
- How to check if I’m on the last page of posts?
- Multisite – Protect categories from deletion?
- Where/how are categories stored?
- Get top parent category
- wp_update_nav_menu_item() to insert categories
- Redirecting specific category posts to subdomain
- How can I prevent users from creating new categories?
- Get child categories when clicking on parent category
- How can I create a loop to build slides based on multiple categories using Coda Slider
- Block multiple categories from Blog
- Best and Cleanest way to remove /category/ from category permalinks? [duplicate]
- Categories list loop – add separator every year
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Filtering by Category doesnt paginate correctly on the backend
- Categories vs. Page Site Organization
- How do I add a function on a specific post category?
- Open subcategories in submenu on click in primary menu
- How to add Categories to the top menu of the website?
- Multiple categories PROBLEM and Duplicating main categories
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- Retrieve Image from Media Library by it’s category
- Getting URL of archive (category) page
- Strip a word from wp_list_categories
- List all the categories with or without post
- Get Unique Categories – Group By?
- Site search needs to find posts for category topic AND Tag or keyword thats not in the post
- Get category url in loop
- Previous/next post links displaying wrong category than is desired
- SQL to migrate post types to taxonomy
- category url structure
- Order by category titles
- How to conditionally hide author name on Single.php if category is “news”, otherwise if category is something else display author name?
- How to let users choose posts order in categories?
- WordPress category
- And/Or Category Query
- Automatically redirect a page to a category that share the same slug
- Show subcategories on a parent category page
- How do I add Category Body Classes to Admin?
- not all categories being displayed
- Category archive is displaying all posts rather than the specific category
- Use the category name instead of category slug in permalinks
- How can I display the number of post associated to a category in Twig/Timber WordPress? [closed]
- How to display the parent category if only the child category has been chosen
- Multiple Category Search with and operator in WordPress
- get_posts() from parent category only using a shortcode
- Different CSS class by category
- Remove any product that is featured from regular display loop [WooCommerce]
- Edit tag_id in category pages of dashboard
- wp_list_categories with category description
- How the posts and categories connected each other in wp 4.1.1?
- How to restrict the amount of categories/post tags/terms for a post type post
- More efficient way to list posts by category [duplicate]
- Query posts by views on category page
- Ordering categories by slug vs. name
- Using in ‘category_name’ in ‘$query->set();’?
- Change appearance based on category but post is in two main categories
- Custom Page Template Category loop not functioning correctly
- how can i hide category?
- Homepage custom recent news
- post_class remove tag- or category- from slug
- creating categories programmatically
- Pagination for a category
- Custom url structure – pages under a custom post type
- How to correctly display category’s slug as a class?
- What is the best way to add an advanced / intermediate / beginner tag to a post
- WP-CLI Add category as menu item main-menu
- Can’t get selected value from wp_dropdown_categories or get_categories
- How to get specific (grand parent) category of current post?
- Blog page with posts from specific categories
- How to change current category to another in wordpress
- Exclude a category and post_type from wp_query
- How to remove parent category from child category url using wordpress rewrite rule?
- loop in single.php of the same category
- Hide a category/posts from the homepage in wp
- Editing categories crashes WordPress site
- Remove “category” from permalink with add_rewrite_rule
- Next and previous links category infinite loop
- Conditional Site Logo(Category Based)
- show only terms from parent category
- Tag Menu items based on their categories
- Accessible Subcategory URL’s pages without using .php hack
- How to display total views of all posts of one category?
- Get the categorie name of Event Organiser plugin [closed]
- in_category(‘category-sluga’) returns true for Archive page of Category ‘category-slugb’
- wp_list_category only showing to logged in uers
- Grouping parent categories into sections
- How to show “category” name?
- Display the category name of a post that is in two different categories
- Querying Multiple Categories With Different Offsets
- filter single_cat_title avoiding the breadcrumbs
- htaccess redirect for all categories converted to tags now showing 404
- altering theme – content generated by PAGES not PORTFOLIO
- Category page with gallery for each post
- (WordPress) How to get custom taxonomy parent name?
- add new input field like category?
- WordPress excerpt for specific posts in category
- How do I get a single page navigation depending on the previous page?
- Search functionality with multiple categories
- Make a menu visible for a single category and it’s content
- How to define category ID in an array?