Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Best practice for custom post type archive hero

Home / Forums / Kadence Theme / Best practice for custom post type archive hero

This topic is: Awaiting Feedback
[Awaiting Feedback]
Posted in: Kadence Theme
November 28, 2022 at 8:12 pm

I have a custom post type for Events and I’m looking for the best way to build a layout that shows the next upcoming event at the top as a hero, and then all subsequent events in a standard grid below. With Elements I can create most of it and I even used a pre_get_posts function to sort the **grid** by a custom event_date… that all works.

The problem is that I can’t find a way to use that custom event_date field to show that single one for the hero. I have an events hero hooked element using advanced text and advanced image to show the “current post”, which seems to just use the latest one from the standard query (by post date I assume).

Should I be using a custom page instead of an archive with hooked elements? If so, how do I build that hero to show the next upcoming event by custom event_date? I’ve tried Post Grid/Carousel block but it’s not really made for a single result.

Is the best way to create an archive-events.php file and do it all manually?

  • The forum ‘Kadence Theme’ is closed to new topics and replies.