Posted: February 10, 2015 at 10:07 am
|
Hi, Looking for some help on displaying events from a certain category on my home page, without using a shortcode. I’ve already got a dropdown box which is populated with all the events available, but I want to tailor this to show only certain events. It’s set up as follows:
This works great. I just need to know which parameter to add to the custom query to refine the result. I tried ‘event_category’, ‘category_id’ and several others but to no avail – would appreciate any help! Cheers |
|
Anyone? Really need to get this sorted. Would appreciate any help at all. Thanks |
|
I solved my problem with the help of the following: https://gist.github.com/joshfeck/e3c9540cd4ccc734e755 Spent hours searching but worth it in the end! Hopefully will be of use to someone else. |
Hello Michael, Thanks for sharing! I wish we could’ve helped you find and answer, next time we will try harder. |
|
|
No problem Seth 🙂 |
Hi Michael, |
|
|
Hi Philip, Sorry for late reply. Glad you found the snippet useful too! I didn’t actually filter the results to be honest, I only have a handful of events in each category, and as I just wanted a quick way to access them from my home page, I used the same query for both category types (just switching the ‘category_slug’ => ‘my-category-slug’, for the category I’d like to pull the info from. One category displays each event horizontally with the featured image, title and link to the event, the other query pulls the event titles into a dropdown select field, which redirects to the event on selection. Hope this helps? |
The support post ‘List events in a certain category on my home page’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.