I think you are asking how to exclude the current exhibition from your upcoming exhibitions query.
If that is the case, simply insert the ID of the current exhibition into the query using ‘post__not_in’:
$exhibition_upcoming_query = array(
'post_type' => 'exhibition',
'orderby' => 'meta_value',
'order' => 'ASC',
'posts_per_page' => 3,
'post__not_in' => array( $exhibition_current_loop->posts[0]->ID ),
'meta_query' => array(
array(
'key' => 'exhibition_start_date',
'value' => date('Y-m-d'),
'compare' => '>',
'type' => 'DATE',
)
),
);
Hit me up if I am misunderstanding what you are after.
Related Posts:
- Build a content and excerpt grid loop with paging and options for # of posts
- How to get post ID in a Page?
- Create a hierarchical loop at predefined markup requirements
- Pagination in category.php not functioning
- Query multiple custom post types in single loop
- Inject post (from specific category) between posts in Loop
- Retrieving 3 latest post from each of 5 different custom post types
- Alter secondary loop to exclude posts from current page category
- Two posts in same div – WP loop
- how to display active, upcoming and past event with featured listing with pagination
- Query for posts in 2 taxonomies
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- How to get to a specific position in wp_query?
- have_posts() execution failure
- Very Slow Page – How to Optimize # of Queries?
- Can’t search posts using WP_QUERY inside AJAX Function
- How to make sure content doesn’t display if selection is empty
- Using foreach loop breaks
- Using loop pagination on single.php
- Why WP_Query(‘showposts=5’) shows only 1 post?
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- pagination not working for category.php (custom post types in categories)
- WP_Query fails despite having 1 post
- wp_query get the 2nd post
- How can I group posts by months and years?
- Display an image if odd number of posts in grid
- Loop increase number
- Using wp_query to modify the loop in index.php for a CPT
- How to add div blocks after certain set of post
- How to overwrite orderby with add_query_var
- Control content before and after custom post type loop
- get_the_ID() in the footer returns wrong value
- Pagination not working on custom query on a page
- change the default order of posts only for specific categories
- Get all posts as an array ID => Name
- WP_Query multiple post results
- Do not duplicate posts with multiple categories in multiple loops
- Infinite Loop – WP_Query
- Posts are not looping through correctly
- postsperpage value not being applied
- Dividing the loop to style post differently
- How to extract information from a wp_query result?
- foreach loop inside the loop creating duplicates in output
- posts_nav_link pulling in multiple post types
- Remove Post if Advanced Custom Field is checked to fix paging
- How to break up php code to avoid echo
- Search.php gets metadata from first post
- the_post(); prints out style text into my HTML?
- Custom Post Type Query W/Category Dropdown
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- Wp Query : Order by distance lat,lon
- search.php to search only the post title
- Page that lists publications by classifying them by taxonomy
- in_array not working on dev server but works on localhost
- WordPress sorting posts by date and title using a dropdown
- Is there anyway I can call the year once?
- How to display sticky post always at the top (before regular post) in wordpress?
- Making list of posts with chosen description
- My query keeps looping infinitely ! how to stop it?
- Efficient way of querying for a “fallback” post?
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- For each 3 posts, show a different post type
- Strange behavior on WP_query
- get_post_meta for Custom Post Type ( CPT )
- Div Missing In Custom Loop Query
- Add post class in custom loop (WP_QUERY)
- display news with pictures 3 small and one large (loop)
- Automatically create a loop for post ID
- Advanced Taxonomy query, with 3 post types
- Query Custom Post Type by Tag
- Custom query_posts() parameter
- Why does a meta_query break this WP_Query?
- Does wp_query and query_posts affect website performance? [duplicate]
- WordPress post pagination on custom template not working
- How do I correctly query posts from a post ID?
- How to modify this function to exclude also the post belonging to a specific category?
- How to exclude certain portfolios from a loop
- Display all categories (with link) of custom post type – WordPress
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- How to sort custom sortable column by custom table value
- I want to show image from custom field image on my custom page template
- /page/2/ redirect to 404
- How to use a conditional statement in a post loop but not count towards the “posts_per_page” if false
- How do I display WooCommerce products in my query to rows of 3?
- How to get posts by a certain author in inner loop using outer loop variable or post title WordPress
- Display all posts in a custom post type, grouped by a custom taxonomy
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Custon Content within WordPress Loop
- How to hide posts of a specific custom category in WordPress?
- displaying a fall back query if there’s nothing in the post-type category
- Strip from or something better?
- CPT loop doesn’t seem to account for post date?
- wp_query with multiple arguments with AND
- Display page content in different sections – based on page break block?
- Custom post Query and WordPress Post Query Clash
- Add active class to foundation 6 tabs while looping categories
- Query specific posts per user selections from dropdown menus
- Catergory args causing loop not to show