5th Apr '23/0 comments/FavoriteEvents Grouped by Event YearSridhar Katakam In this Pro tutorial, we share the PHP code for outputting past events grouped by the event year in descending order of the event year. Scenario: CPT: eventDate custom field: event_date Sample events: Current date at the time of writing this tutorial: 5 Apr 2023 Output: We shall get all the past events using get_posts() and a meta_query loop through the past events and store them as values of an array whose keys are the years sort years in descending order loop through the years and output the events grouped by years Note: This code can be used in any WordPress site and is not Bricks-specific. PHP This is a BricksLabs Pro tutorial. For full access login below or create your BricksLabs Pro account Username Password Remember Me Forgot Password Tagged: PHPProWordPressSridhar KatakamSridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.Get access to all 526 Bricks code tutorials with BricksLabs Pro
Pro Custom SQL Ordering for Sorting Events in BricksShowing events ordered by the event date with upcoming events in ascending order and past events in descending order.Read more →Categories: Bricks, ProTags: Ordering, Sorting, SQL
Pro ACF Relationship: Show all other events related to the artists of the current eventHow all other events related to the artists of the current event can be output in a Bricks query loop.Read more →Categories: Bricks, Plugins, ProTags: ACF, Relationship
Ordering The Events Calendar Events in BricksLooking to order the list of events output via a query loop in Bricks when using The Events Calendar?Read more →Categories: Bricks, Free, PluginsTags: The Events Calendar
Pro Modern Events Calendar in BricksThis Pro tutorial provides the steps for using Modern Events Calendar in Bricks. We shall set up the single event Bricks template with a combination…Read more →Categories: Bricks, Plugins, ProTags: Modern Events Calendar
How to Show Future Events in BricksOne of the common requirements in WordPress is being able to filter the events (or could be posts of any post type) to only those…Read more →Categories: Bricks, FreeTags: Meta Query
Pro Events grouped by months within years based on event date custom field valueHow to output events grouped by years and months using three nested query loops in Bricks.Read more →Categories: Bricks, ProTags: Nested Queries
Pro Events grouped by Event Date custom field in BricksThis Pro tutorial for Bricks users provides the steps to output posts of an event custom post type dynamically grouped by the value of their…Read more →Categories: Bricks, Plugins, ProTags: ACF, Nested Queries
Pro Single Event Template for The Events Calendar in BricksUpdated on 19 Sep 2024 The Events Calendar is one of the most popular event plugins for WordPress. With The Events Calendar active, single event…Read more →Categories: Bricks, Plugins, ProTags: The Events Calendar
Pro Upcoming Events Grouped by ‘Month Year’ in BricksA custom query loop type for showing future events based on a date custom field using three nested query loops.Read more →Categories: Bricks, ProTags: ACF, Custom Query Type, Query Loop