You could try merging the two arg arrays:
$args = array(
'post_type' => array('post','page'),
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'slider'
),
array(
'taxonomy' => 'my_taxonomy',
'field' => 'slug',
'terms' => 'slider'
),
),
);
Related Posts:
- The next_posts_link() works only with original $wp_query
- Displaying the category name of a custom post type
- Skipping first 3 posts in wp query
- Pagination not working on Custom Page Template
- wp query with dynamic taxonomies and terms?
- WP_Query do not load specifed number of post
- Why won’t my taxonomy query show up?
- How to get Tags with specific post id
- Using wp_list_pages() after calling query_posts()
- Display posts of specific category term
- Limiting post list by taxonomy
- How to create page with post content in it?
- Page with Category Returning 1
- Wp_query loop is not working as it should
- Is it possible to query a category with specified posts?
- My custom query is displaying random posts in random order
- how to change the permalink to a specific location?
- Multiple loops on a Search result page?
- The next_posts_link() works only with original $wp_query
- Limit amount of pages shown in pagination within wp_query
- Should we trust the post globals?
- how to limit edit_form_after_title hook to page and post edit only?
- How to know if get_posts() failed?
- Show related posts by category but ignore one category
- post__in for get_posts with a dynamic array
- Create custom page in WooCommerce
- Post content being duplicated by the_content();
- How to extract images of post and pages excluding header and logo image in wordpress?
- how to show all post in my page-grid.php template page
- How to add padding between posts
- eBooks download website, page or post?
- Add few specific post ids to wp_query
- Can I hide a specific post from latest posts page?
- Hide add new page button
- How to show post(excerpt) from specific category on wp page?
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- How to set up multiple taxonomies for groups of posts
- how to get posts ids inside pre_get_posts filter?
- Can I divide the pages into categories?
- How do I use WP_Query to get a range of posts with custom fields that have numbers with letters in them?
- How do I get blog posts to appear within CMS?
- Change post order random through out the entire WordPress
- Get Posts Under Custom Taxonomy
- Integrate OpenStreetMap on WordPress
- What’s the best way to render Visual Composer in posts, not pages?
- How safe is renovating $wp_query when doing WP_Query pagination in Page Template
- Overwrite posts/pages via import
- Auto-realod with new posts // Ajax call
- wp_query random post
- Is there a way to specify an extra class for a post or page with no title?
- how to get post order by post id wp_query?
- Display Posts on Custom Page
- Possible to alternate between two loops
- How to display all posts divided/ordered by post date? [closed]
- Every second post different class in blog view
- Can’t understand why sometimes a [caption] field appears
- Why in my query is display two title?
- wp_query with ajax
- display posts of custom post type with custom taxonomy
- Programatically adding custom filters to post list
- Make ‘blog’ page show content as well as posts underneath it
- Use posts_where to exclude posts ids from wp_query
- Why does WordPress search returns same number of results for every search query?
- Setting limit to posts or page creation
- Using Posts Like a Page
- Pagination for normal (standard) posts on a page with a custom loop?
- Sidebar limiting to 10 posts?
- post/page content
- WordPress Architecture as a CMS – Posts & Pages
- Is it to possible to insert a page in the post depending on the category ofthe post
- How to associate a custom taxonomy to a post multiple times
- Override WordPress core post-template.php block template
- Automatic duplicate/copy of post to a related page in WordPress
- Change Old WordPress Post Date Year
- Yoast breadcrumb URL shows category instead of the page
- Display/Filter post using if else statement
- Search results for ACF data
- Query prints posts without specific categories
- Nestling Posts Under Page & Justify Text
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- Disable pagination in posts and pages
- Loop through all posts showing duplicates
- How do I make it so that new posts within a certain category go into a certain page?
- WordPress text field in array problem
- Random order of the 5 most popular posts
- Get query result according to merged array
- How to show the posts list into a static page? Problems to use the loop into a static page
- some posts being displayed as pages
- Displaying Results From Custom Taxonomy Query
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- Get part of a page url
- can’t post immediately
- Displaying only posts from a certain category on my custom page template
- Where are my posts linked to? I keep getting a Not Found Error, and I have no single.php page
- How do I show the post title if an advanced custom field hasn’t been used?
- Custom post page has attributes of latest post [closed]
- WordPress “Posts Page” isn’t showing template dropdown
- How do I hide single category post on my post page
- How to have 2 posting pages on a blog
- WP_Query post_tilte search in posts table