Man, can't believe it was so hard to find a solution, would think it was a more common requested feature. But I'm glad I found your video, it works now, thanks a lot 👌
@@daveden2 I'm using Jet Enjine, Listing Grid but it doesn't work for me, so I'm using Loop Grid by Elementor. But can't sort my Loop Items by date from the jet engine custom field, I think they use different date formats. Had to install ACF and use your instructions. Had other issues with this on my site though.doesn't work for me, so I'm using Loop Grid by Elementor. But can't sort my Loop Items by date from the jet engine custom field, I think they use different date formats. Had to install ACF and use your instructions. Had other issues with this on my site though.doesn't work for me, so I'm using Loop Grid by Elementor. But can't sort my Loop Items by date from the jet engine custom field, I think they use different date formats. Had to install ACF and use your instructions. Had other issues with this on my site though. Thank you for your useful work!
Thanks for posting this video. I am using ACF and Elementor Pro. Could I do what you show with these or do I need Crocoblocks? I'm trying not to spend money until I can prove my website concept is good.
Dear Sir, how can we add a sorting dropdown in the shop page when using loop grid? You know, the typical sorting dropdown that lets users filter by Price from High to Low, Low to High, A-Z, Z-A
@@daveden2 unfortunately it's no using Ajax but works perfectly for now. The other solution was using WBW Filter, but the free version comes with a button for applying the filter and I don't like the fact that users have to click on a button after selecting the option, it should be applied automatically.
This is really awesome! Thank you! For all wondering, I just used this code on the newest elementor pro version and it does work. I do have a question. I follwed to your page where it also shows how to unpublish older events. When exactly does this wp daily check occur? I've implemented this code and everything is working except the function to unpublish an event. Many thanks!
@@daveden2 I'd really appreciate that. I'm pulling my hair out. I've researched and researched, combed over the code you wrote 1000 times and everything looks perfect. I just can't understand why it isn't firing.
It's a good tutorial, For same day events. I have been looking for days for a code that also takes into account events that take place over several days so that they are no longer immediately visible on the start date. Maybe something for a part 2?
Hi, thanks for the solutions. However, I'm using jetsmartfilters by crocoblock, which needs the query id field filled with jet-smart-filter to filter the loop grid. Do you know how can the query id listens to multiple ids?
@@daveden2 friend, thank you very much! I implement this code but the past events do not disappear. change 'start_date' to my key. How do I make it work? thank you!
What if you want taxonomy terms to appear in a certain order in this loop grid? For example, I use ACF, I have a taxonomy "Sale Type" and it contains these terms "Auction" "Buy" "Sold". In the loop grid the results appear according to the date published, however, I'd prefer the "Auction" results have priority and appear first, then the "Buy" results, then the "Sold" results. Do you have any suggestions? Thank you
I'll look into it. But from what I've seen, there's no direct way to order posts by a taxonomy term, primarily because a post can have multiple terms. My suggestion would be to do one of 2 things: 1. Do 3 different listings, one for each term or 2. add a meta field that's equal to the primary term, then order by that meta value. But I'll do some more research on it.
Wow, your video are very helpful bro. Can you show me how you create your custom events page? From start (ACF creation) to finished? I have mine but the start date, published date would not show in the back end so I will know when is the start and no need to open each event :) hope you understand my explanation hahaha? But you're awesome! Looking forward for more elementor ACF videos! Thank you.
Hello, thanks for the tip, but i would like to ask you if exist a solution to order by ACF date and hour, i mean i have a date field and a hour field, then if for example today i do an event from tomorrow at 6pm and tomorrow i did another event with the same date but at 4pm, then i would like to show also the order by hour. How can i do that? Thank you in advance.
@@daveden2 Hello Daveden, i have tree ACF fields, one of them is a date and hour selector, I use this one to put a counter down in the event post, the other ones are a date selector and an hour selector, I use those fields in the post loop, I am using your code to order the loop by date and it works but if i have two or tree different events in the same date I also want to put in order by hour. For example, right now suppose i create today 2 events and tomorrow the other one, the first two events with 8pm and 9pm and the third one for 6pm, so in the loop appears without time order, first 8pm, 9pm and last 6pm. I would like that the loop takes the order firstable by date selector and then by the hour selector of the ACF fields. Tahnk you
You can try this code and let me know if it works. Ensure that: 1. ACF date field = start_date 2. ACF time field = start_time. 3. ACF date return format = 'Ymd' 4. ACF time return format = H:i:s, to make calculations easier. 5. Elementor Query ID = dd_event_date_time Code Snippet ============
@@harvinderdhami9795 I just published a written tutorial for you. Let me know if it works. I'll try to get a video out as well. daveden.co.uk/tutorials/sort-your-elementor-loop-grid-by-acf-checkbox-to-prioritise-sold-items-last/
I'm using Elementor 3.20.3, and there is not a "Query ID" field. It shows a field called "Advanced Query Options", with a whole different set of settings. Can you help here? Thanks, man!
Yes, I'm using Advanced Queries. But I read somewhere that this solution doesn't work with WooCommerce itens in the loop grid. And that's what I needed. 😬
@tiagolacerda77 ah I see. I've never used Advanced Queries before. So I don't know much about it. I typically either write my own custom query or use JetEngine's Query Builder
Man, can't believe it was so hard to find a solution, would think it was a more common requested feature. But I'm glad I found your video, it works now, thanks a lot 👌
Very useful! Thank you Daveden
Thanks!
You're welcome! I'm glad it helped. Thanks for the donation!
Thank you so much. You are a life saver. You got a new subscriber.
Oh, cool! You're welcome. I'm glad it helped
Oh man. Thanks for this. You’re the boss ! I prefer ACF. I did use CPT but I’m more used to ACF as an all in one now.
Yeah, since ACF integrated creating CPTs and Taxonomies, they seem to be the most popular choice
This is fantastic! I was so close to giving up and using a plug-in, but you've given me hope.
Ah, I see! I'm glad I was able to help
You are my savior! However, I was unable to do this with Jet Engine, so I installed ACF in addition. But now it works and I'm happy ;)
I'm glad it worked out well for you! I'll look into the JetEngine version.
@@daveden2 I'm using Jet Enjine, Listing Grid but it doesn't work for me, so I'm using Loop Grid by Elementor. But can't sort my Loop Items by date from the jet engine custom field, I think they use different date formats. Had to install ACF and use your instructions. Had other issues with this on my site though.doesn't work for me, so I'm using Loop Grid by Elementor. But can't sort my Loop Items by date from the jet engine custom field, I think they use different date formats. Had to install ACF and use your instructions. Had other issues with this on my site though.doesn't work for me, so I'm using Loop Grid by Elementor. But can't sort my Loop Items by date from the jet engine custom field, I think they use different date formats. Had to install ACF and use your instructions. Had other issues with this on my site though.
Thank you for your useful work!
Thanks, am glad I found your solution quick
Oh, cool! You're welcome.
Thank you so much for this! Elementor has so many limitations but you are amazing at helping us get around them
Thanks! I'm glad you enjoyed the video. Hopefully, elementor will create easier ways to implement these soon.
I just used this code and tweaked it for a client site. It works great! Thank you!
Nice! You're welcome
Thanks Daveden, tried a different tutorial and it didn't work but this worked perfectly :)
Exactly what I needed. Thank you!
Oh, that's awesome! I'm glad I could help. Thanks for the donation, too. 🙏
Absolutely brilliant! Thanks so much. Exactly what we were looking for!!
Thank you so much you are an excellent teacher.
I'm glad it worked out for you! Thanks a lot for the compliments!
Very thorough! Thank you!
You're welcome. Thanks for the comment!
you saved my life, thanks!
Awesome! I'm glad I could help. 🙏
Thank you very much! This was a great solver!
This worked perfectly. Thank you!
This worked really well. Thank you! :)
You're welcome. I'm glad to hear that
Excellent Video!
Great tutorial, thanks a lot. Just one question. How do you manage to show the Start Date in the backend post list tabel overview?
I used a plugin for it, Admin Site Enhancement. But you can also do it with a code snippet.
I'll try to find the code and share it later.
Thank you very much for your tutorial 👍
I'm glad it helped you
Thank you! This helped me alot.
I'm glad to hear that
Thanks for posting this video.
I am using ACF and Elementor Pro.
Could I do what you show with these or do I need Crocoblocks? I'm trying not to spend money until I can prove my website concept is good.
You don't need JetEngine. The method I showed in the video works well with ACF.
Dear Sir, how can we add a sorting dropdown in the shop page when using loop grid? You know, the typical sorting dropdown that lets users filter by Price from High to Low, Low to High, A-Z, Z-A
Currently, you need a filtering plugin like WPGridBuilder or JetSmartFilters. Then, you can combine that with the Off-canvas widget.
@@daveden2 i found the solution with a code snippet, works perfectly without any other plugin!
@@sergio_grez nice!!! Is the code snippet using Ajax filtering?
@@daveden2 unfortunately it's no using Ajax but works perfectly for now. The other solution was using WBW Filter, but the free version comes with a button for applying the filter and I don't like the fact that users have to click on a button after selecting the option, it should be applied automatically.
Thank you very much for this!
You're welcome
Very Nice tutorial. working as well.
This is really awesome! Thank you! For all wondering, I just used this code on the newest elementor pro version and it does work.
I do have a question. I follwed to your page where it also shows how to unpublish older events.
When exactly does this wp daily check occur? I've implemented this code and everything is working except the function to unpublish an event.
Many thanks!
Oh great! I'm glad to hear that.
The check should depend on your server. I'll try to study the code more to see why it isn't working for many people.
@@daveden2 I'd really appreciate that. I'm pulling my hair out. I've researched and researched, combed over the code you wrote 1000 times and everything looks perfect. I just can't understand why it isn't firing.
Thank you so much!!!
This is exactly what I needed
Thank you!
It's a good tutorial, For same day events. I have been looking for days for a code that also takes into account events that take place over several days so that they are no longer immediately visible on the start date. Maybe something for a part 2?
I would expect the code to work for a multiday event as well.
The code hides events based on the "start_date" ACF date field.
Hi, thanks for the solutions.
However, I'm using jetsmartfilters by crocoblock, which needs the query id field filled with jet-smart-filter to filter the loop grid.
Do you know how can the query id listens to multiple ids?
Wow, I never considered that scenario. I'll do some research and get back to you.
Here's a link to the feature request to make this native in Elementor -
github.com/orgs/elementor/discussions/22156
Thanks. We need the second function that help to expire posts based on date field. Please make the tutorial or put the code in the description.
Once I run some more tests, I'll update the post / release a follow up video
@@daveden2 ok
I've updated the article - daveden.co.uk/tutorials/order-elementor-loop-by-acf-date-field/. Please let me know if it works for you
@@daveden2 friend, thank you very much! I implement this code but the past events do not disappear. change 'start_date' to my key. How do I make it work? thank you!
@@gonzalorozas1769 did you set the date format to Y-m-d?
Dear Daveden, does it also work for nested repeater fields? In my case, both my Dates field and Event field are repeaters. Should I change anything?
To the best of my knowledge, the Elementor loop grid doesn't work well with repeater fields.
What if you want taxonomy terms to appear in a certain order in this loop grid? For example, I use ACF, I have a taxonomy "Sale Type" and it contains these terms "Auction" "Buy" "Sold". In the loop grid the results appear according to the date published, however, I'd prefer the "Auction" results have priority and appear first, then the "Buy" results, then the "Sold" results. Do you have any suggestions? Thank you
I'll look into it. But from what I've seen, there's no direct way to order posts by a taxonomy term, primarily because a post can have multiple terms.
My suggestion would be to do one of 2 things:
1. Do 3 different listings, one for each term or
2. add a meta field that's equal to the primary term, then order by that meta value.
But I'll do some more research on it.
@@daveden2 thanks Dave! Yes at the moment I’m currently utilising your suggested method 1. It’s a tricky one
That's cool mate! is it possible to do same with another ACF field like an OrderId which is a number? I might just modify the comparing function?
You can try this modified query, where the query id is 'dd_order_id' and the ACF field is 'event_order_id'
Wow, your video are very helpful bro. Can you show me how you create your custom events page? From start (ACF creation) to finished? I have mine but the start date, published date would not show in the back end so I will know when is the start and no need to open each event :) hope you understand my explanation hahaha? But you're awesome! Looking forward for more elementor ACF videos! Thank you.
I'm glad that the videos have been helpful.
I'll try to work on a start-to-finish video.
Hello, thanks for the tip, but i would like to ask you if exist a solution to order by ACF date and hour, i mean i have a date field and a hour field, then if for example today i do an event from tomorrow at 6pm and tomorrow i did another event with the same date but at 4pm, then i would like to show also the order by hour. How can i do that? Thank you in advance.
Yes, you'd have to create an array for the orderby in the query.
What type of acf field is the hour field?
@@daveden2 Hello Daveden, i have tree ACF fields, one of them is a date and hour selector, I use this one to put a counter down in the event post, the other ones are a date selector and an hour selector, I use those fields in the post loop, I am using your code to order the loop by date and it works but if i have two or tree different events in the same date I also want to put in order by hour. For example, right now suppose i create today 2 events and tomorrow the other one, the first two events with 8pm and 9pm and the third one for 6pm, so in the loop appears without time order, first 8pm, 9pm and last 6pm. I would like that the loop takes the order firstable by date selector and then by the hour selector of the ACF fields.
Tahnk you
@@cristianpacher9992 okay, I'll look into it and get back to you soon
You can try this code and let me know if it works. Ensure that:
1. ACF date field = start_date
2. ACF time field = start_time.
3. ACF date return format = 'Ymd'
4. ACF time return format = H:i:s, to make calculations easier.
5. Elementor Query ID = dd_event_date_time
Code Snippet
============
How can we use this for a checkbox field? If I wanted to sort posts that have the checbox marked to display last?
Sorry, I'm not sure how to do that yet. I'll have to take a closer look.
So, are there multiple checkboxes. Or how is the setup?
@@daveden2 Would be greatly appreciated. No there is only a single checkbox that is called "Status" and it has a value of "Sold"
@@harvinderdhami9795 I just published a written tutorial for you. Let me know if it works. I'll try to get a video out as well.
daveden.co.uk/tutorials/sort-your-elementor-loop-grid-by-acf-checkbox-to-prioritise-sold-items-last/
@@daveden2 Hi Buddy, thanks for the tutorial, ive tried to check it out today however your website seems to be throwing a BAD GATEWAY error 502
@@harvinderdhami9795 , thanks for the heads-up. My host changed their ip. I'll get it sorted asap
I'm using Elementor 3.20.3, and there is not a "Query ID" field. It shows a field called "Advanced Query Options", with a whole different set of settings. Can you help here? Thanks, man!
That could be from an Elementor addon. On your plugins page, do you have a plugin like Advanced Queries?
Yes, I'm using Advanced Queries. But I read somewhere that this solution doesn't work with WooCommerce itens in the loop grid. And that's what I needed. 😬
@tiagolacerda77 ah I see. I've never used Advanced Queries before. So I don't know much about it. I typically either write my own custom query or use JetEngine's Query Builder
I'm also unable to find "Query ID" :/
@@fonty.visuals, are you also using Advanced Queries?
What's your preferred plugin for creating CPTs and Custom Fields?
CrocoBlock
@@shahinulislam9304JetEngine is really powerful
JetEngine :) But I like the new interface of ACF.
@@LudovicCharlier yeah, me too. The new ACF interface looks really nice
Can you post the code to change status to draft? or where you found it?
Thanks for the reminder. I'll update my post as soon as I can.
I've updated the article - daveden.co.uk/tutorials/order-elementor-loop-by-acf-date-field/. Please let me know if it works for you
Gracias Crack!!, 🤯🙏
How to show all posts without the array 'compare'?
Simply remove the meta_query
This is exactly what I needed