Try Below Code :-
$query = new WP_Query(array(
'posts_per_page' => 2,
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'post_format',
'field' => 'slug',
'terms' => array( 'post-format-link' )
),
array(
'taxonomy' => 'space',
'field' => 'term_id',
'terms' => array('16'), // 16 is the code for tag longform
'operator' => 'IN'
)
)
));
Related Posts:
- How to show related posts by category
- How to display posts by current user/author in a custom page template?
- How to get previous 10 days post from a specific date – WP Query
- Query only Posts from Both of Two Category?
- WordPress get posts by date without query_posts
- Can I set and show “important” post in my blog?
- Inserting custom data to the_post() during loop
- Why is querying posts messing up my pages?
- How to get posts from a current post’s month?
- While loop articles – if statement order
- Display Posts with template on a Page
- Post Filtering by GET URL parameters
- How to give classname to post if post has no content?
- Get posts from current category?
- How to merge the content of posts that have the same title?
- get posts, run a custom query, and join the results
- How to mark only one post as Featured post?
- How to get all post titles starting with numbers and symbols?
- Word count for all posts of all authors
- Get Posts Under Custom Taxonomy
- Get the ID of the latest post
- the_author() returns empty string
- get_children() Not Working with orderby Parameter
- How to get all posts related to particular category name?
- post_name empty after wp_insert_post
- Meta Query with date and time on the same Day before given time
- Setting pagination for images attached to a post
- Insert custom div between posts
- Only display posts with comments
- Working Bootstrap Carousel Conversion to WP – Technical Questions
- How to Display Post View Count
- Different amount of posts on homepage than paged pages
- Exporting Data from WordPress into a flat table
- How Can i Get 5 Recent Post Title With Corresponding Link?
- How would I get 1 latest post from a query for 5 posts?
- setup_postdata doesn`t seem ot be working
- Exclude posts with empty post_content in wp_query
- Get Posts via Taxonomy Term Name with Space
- Get specific posts by ID in wordpress
- Automatically republish old posts
- is there a way to show the the post title after the image?
- Category Foreach keeps looping?
- Blog post per page setting conflicting with custom WP_Query?
- How to exclude latest x posts from a paginated query?
- Post Loop Missing Most Recent Post
- Display an author’s posts on his own author page
- How to make multiple sections in home pulling posts category wise?
- Query Posts by Custom Field
- Wrong post title displayed from loop
- How to get posts and comments amount per hour, per year and per month?
- Count number of posts of current month
- Conditionals if tags exist?
- Random posts from a pool of posts
- Get the amount of posts on a current page
- Conditional Tag for has post [closed]
- Posts – display all posts except a post by an ID
- why the same code got different results when using query_posts in functions.php and index.php
- Query posts by Author and/or by Tag
- Archive template combined with post slider and regular posts
- How to get posts published on the latest date?
- WP_Query: Show 10 posts in date order, first three random
- Get post by tag
- Random posts that always include a particular post?
- Related Posts function not working
- Echo the number of posts being displayed
- Exclude a category of posts in author template
- If post does not exist, do something
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Trying to query all posts in category 4
- Change content off every sixth element
- How to add content above footer in posts from specific category
- Get other posts sharing the same meta values
- Show posts from two specific category in WP_Query
- How to create loop of posts except post ID defined via ACF field
- Displaying all posts from other sites on the network on one site
- Multisite how to display merged posts from two sites and sort by latest date?
- Mix post date with post meta value using WP_Query
- How to display particular categorie’s post which associated to specific user?
- REST API Working for GET but not for POST?
- Fill the exclude array() in get_posts()
- How to add navigation arrows to manually slide through posts?
- Manipulate query to show specific post
- How to correctly escape data
- Blog posts not displaying on blog posts page
- How to convert return type of ‘get_posts()’ same as ‘wp_get_recent_posts()’?
- Sort Events by Venue Title – Sort Post set by related post ids
- Get posts by category or author
- get “read more” with custom DB query like you would with WP Query
- Advanced Post Display/Pagination/Ordering
- How to pass multiple checkbox values to wordpress query?
- How do I paginate posts page with $wpdb?
- How to inject a post within a loop
- Bulk Attach Or Insert Media To Post Without Opening Post Editor
- How to get alphabetic listing x other posts, based on first letter post?
- Displaying posts on Homepage
- How to get single post by one author?
- wordpress show category link instead of post link [closed]
- posts_per_page – Repeats only first posts ‘post__in’ array
- query_posts different amount of posts per page [duplicate]
- append $_GET parameters to post