<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'event',
'meta_query' => array(
array(
'key' => 'event_date_end_timestamp',
'value' => time(),
'type' => 'numeric',
'compare' => '<'
)
)
);
$programs = new WP_Query($args);
?>
<?php while($programs->have_posts()): $programs->the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php endwhile; ?>
Related Posts:
- Why Query is returning empty array?
- How to limit the number of posts that WP_Query gets?
- Should we trust the post globals?
- Random sort within an already sorted query
- How to know if get_posts() failed?
- post__in for get_posts with a dynamic array
- Using $wpdb to query posts with meta value containing current post_id
- WP_Query to work with custom view
- WordPress Number of Posts Not Changing With posts_per_page
- How to add posts to wp_query result?
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- Replace Main Query With Custom Query
- Search query – exact post title match
- posts_per_page doesnt work
- How to start with post number x?
- Exclude posts with empty post_content in wp_query
- Only display a certain number of posts, dependent on how many posts there are available in a query
- Improving WP_Query for performance when random posts are ordered
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Get Posts that are in the current month or later
- How to do set post permalinks using 6 digit random unique function?
- Exclude the first ‘n’ number of posts of a tag from home page?
- posts_per_page option limits the number of Gallery items
- wp_posts table: safely remove unused columns to save database storage
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- Do not show children of a category
- Query for first 3 posts to change the look and feel
- Why posts array is empty?
- How to give classname to post if post has no content?
- Exclude some posts from displaying in wp_query based on some condition
- Related Posts function not working
- How to retrieve certain number of images from a wordpress post?
- How to convert query sql to shortcode in wordpress?
- How Can I Always Display A Particular Post First Using WP_Query?
- WordPress Query – Display 5 posts (same post type), each from a given tag
- filter posts based on menu_order
- Show 5 posts and than 3 posts offset with pagination
- wp query custom orderby not custom field
- Sort / Filter Queries
- Advanced Post Display/Pagination/Ordering
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Displaying Results From Custom Taxonomy Query
- WP_Query retrieve custom posts but not the post showing
- Wp_query WooCommerce products
- WP_Query post_tilte search in posts table
- Search by Hyphen
- Exclude drafts in all() view of edit.php
- Exclude posts with specific meta_value while sorting by a separate meta_value
- Fetch posts from current week (Sunday to Saturday)
- How would I get 1 latest post from a query for 5 posts?
- Display page content AFTER a loop of posts
- Exclude posts from featuring
- Lazy Load using WP_Query pagination
- AJAX filter posts by year
- Yearly archive page for future year
- convert custom query to wp_query
- Sticky post appears twice
- Ajax load more button in Recent posts widget
- How Can I Query a Specific Page From a MultiPage paginated Post
- is there a way to show the the post title after the image?
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- Blog post per page setting conflicting with custom WP_Query?
- filter RSS feed in URL
- Select only post id and meta value with WP_Query
- WordPress custom Query for Posts in Category display posts multiple times
- How do I extract just the post ID of the first item in whatever WP_Query returns?
- WordPress query posts with multiple post_meta data
- Loop doesn’t exclude the specified category in home page
- Can’t get full post title if there a spaces in title
- why the same code got different results when using query_posts in functions.php and index.php
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- WP_Query: Show 10 posts in date order, first three random
- WordPress Loop: How to display recent posts in multiple divs
- Conflict array_splice on loop and query in widget
- WP_Query of Category Not Showing First Post
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- Change content off every sixth element
- Custom Select Query – Selecting the Year?
- WordPress, custom post type and posts query help!
- While loop in functions.php outputting the_title() of each post on frontpage
- Show posts from two specific category in WP_Query
- How to create loop of posts except post ID defined via ACF field
- Ignore posts content in the posts queries for internal linking
- a WordPress connected to 2 database
- WP_Query that targets all categories
- Fill the exclude array() in get_posts()
- Double loop output
- AJAX load more posts not using correct category and repeating the same few posts
- Displaying a specific sub-category’s posts from wp_query
- Sort Events by Venue Title – Sort Post set by related post ids
- Custom layout manager for posts
- Get results from the main wp_query
- Pagination for custom query won’t let me back on page 1
- How to get single post by one author?
- List posts related to category on a div [closed]
- How to set value in Query Loop?
- query_posts different amount of posts per page [duplicate]
- Display posts with id equal to relationship value
- Sort Posts Alphabetically Based on Specific Category (Divi)