Order Elementor Loop Grid by ACF Date Field

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 113

  • @Kakme
    @Kakme Год назад +6

    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 👌

  • @gaelle4466
    @gaelle4466 10 месяцев назад +2

    Very useful! Thank you Daveden

  • @WilliamMarshall
    @WilliamMarshall 4 дня назад +1

    Thanks!

    • @daveden2
      @daveden2  4 дня назад

      You're welcome! I'm glad it helped. Thanks for the donation!

  • @varabitwebdesign
    @varabitwebdesign Месяц назад +2

    Thank you so much. You are a life saver. You got a new subscriber.

    • @daveden2
      @daveden2  Месяц назад +1

      Oh, cool! You're welcome. I'm glad it helped

  • @caknuckler
    @caknuckler Год назад +3

    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.

    • @daveden2
      @daveden2  Год назад

      Yeah, since ACF integrated creating CPTs and Taxonomies, they seem to be the most popular choice

  • @Jessica-ld4bs
    @Jessica-ld4bs Год назад +1

    This is fantastic! I was so close to giving up and using a plug-in, but you've given me hope.

    • @daveden2
      @daveden2  Год назад

      Ah, I see! I'm glad I was able to help

  • @oksy_roxy
    @oksy_roxy 7 месяцев назад +2

    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 ;)

    • @daveden2
      @daveden2  7 месяцев назад +1

      I'm glad it worked out well for you! I'll look into the JetEngine version.

    • @oksy_roxy
      @oksy_roxy 7 месяцев назад

      @@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!

  • @tolua.6762
    @tolua.6762 2 месяца назад +2

    Thanks, am glad I found your solution quick

    • @daveden2
      @daveden2  2 месяца назад

      Oh, cool! You're welcome.

  • @zachtoth4985
    @zachtoth4985 9 месяцев назад

    Thank you so much for this! Elementor has so many limitations but you are amazing at helping us get around them

    • @daveden2
      @daveden2  9 месяцев назад

      Thanks! I'm glad you enjoyed the video. Hopefully, elementor will create easier ways to implement these soon.

  • @crispcomms
    @crispcomms 4 месяца назад +1

    I just used this code and tweaked it for a client site. It works great! Thank you!

    • @daveden2
      @daveden2  4 месяца назад

      Nice! You're welcome

  • @joecm
    @joecm 9 месяцев назад +1

    Thanks Daveden, tried a different tutorial and it didn't work but this worked perfectly :)

  • @mediumstudio
    @mediumstudio 3 месяца назад +1

    Exactly what I needed. Thank you!

    • @daveden2
      @daveden2  3 месяца назад +1

      Oh, that's awesome! I'm glad I could help. Thanks for the donation, too. 🙏

  • @Nadworks-cb
    @Nadworks-cb 9 месяцев назад +1

    Absolutely brilliant! Thanks so much. Exactly what we were looking for!!

  • @dianastathakis8528
    @dianastathakis8528 8 месяцев назад +1

    Thank you so much you are an excellent teacher.

    • @daveden2
      @daveden2  8 месяцев назад

      I'm glad it worked out for you! Thanks a lot for the compliments!

  • @TheLoveofGod316
    @TheLoveofGod316 6 месяцев назад +1

    Very thorough! Thank you!

    • @daveden2
      @daveden2  6 месяцев назад

      You're welcome. Thanks for the comment!

  • @mateusbotellho
    @mateusbotellho 2 месяца назад +1

    you saved my life, thanks!

    • @daveden2
      @daveden2  2 месяца назад

      Awesome! I'm glad I could help. 🙏

  • @gr131
    @gr131 Год назад +1

    Thank you very much! This was a great solver!

  • @shanevonknuth
    @shanevonknuth 8 месяцев назад +1

    This worked perfectly. Thank you!

  • @theunifiedfield.
    @theunifiedfield. 4 месяца назад +1

    This worked really well. Thank you! :)

    • @daveden2
      @daveden2  4 месяца назад

      You're welcome. I'm glad to hear that

  • @NathanCarroll-i1f
    @NathanCarroll-i1f 11 месяцев назад +1

    Excellent Video!

  • @Havsland
    @Havsland 4 месяца назад +1

    Great tutorial, thanks a lot. Just one question. How do you manage to show the Start Date in the backend post list tabel overview?

    • @daveden2
      @daveden2  4 месяца назад

      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.

  • @patriceaschen1324
    @patriceaschen1324 10 месяцев назад +1

    Thank you very much for your tutorial 👍

    • @daveden2
      @daveden2  10 месяцев назад

      I'm glad it helped you

  • @michaelschaffner3128
    @michaelschaffner3128 6 месяцев назад +1

    Thank you! This helped me alot.

    • @daveden2
      @daveden2  6 месяцев назад

      I'm glad to hear that

  • @greg54444
    @greg54444 10 месяцев назад +2

    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.

    • @daveden2
      @daveden2  10 месяцев назад

      You don't need JetEngine. The method I showed in the video works well with ACF.

  • @sergio_grez
    @sergio_grez 3 месяца назад +1

    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
      @daveden2  3 месяца назад

      Currently, you need a filtering plugin like WPGridBuilder or JetSmartFilters. Then, you can combine that with the Off-canvas widget.

    • @sergio_grez
      @sergio_grez 3 месяца назад +1

      @@daveden2 i found the solution with a code snippet, works perfectly without any other plugin!

    • @daveden2
      @daveden2  3 месяца назад

      @@sergio_grez nice!!! Is the code snippet using Ajax filtering?

    • @sergio_grez
      @sergio_grez 3 месяца назад +1

      @@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.

  • @stefanofietsj
    @stefanofietsj 6 месяцев назад +1

    Thank you very much for this!

    • @daveden2
      @daveden2  6 месяцев назад

      You're welcome

  • @VictorAlfonsoCoronado
    @VictorAlfonsoCoronado 9 месяцев назад +1

    Very Nice tutorial. working as well.

  • @joshuagates2735
    @joshuagates2735 3 месяца назад +1

    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
      @daveden2  3 месяца назад

      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.

    • @joshuagates2735
      @joshuagates2735 3 месяца назад

      @@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.

  • @EbbaMusikhuset
    @EbbaMusikhuset 5 месяцев назад +1

    Thank you so much!!!

  • @JeremyMcKnight
    @JeremyMcKnight 10 месяцев назад

    This is exactly what I needed

  • @blackvx
    @blackvx Год назад +1

    Thank you!

  • @GijsFranken-rj6xy
    @GijsFranken-rj6xy 8 месяцев назад

    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?

    • @daveden2
      @daveden2  8 месяцев назад

      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.

  • @987654321ABC1000
    @987654321ABC1000 4 месяца назад

    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
      @daveden2  4 месяца назад +1

      Wow, I never considered that scenario. I'll do some research and get back to you.

  • @daveden2
    @daveden2  Год назад +2

    Here's a link to the feature request to make this native in Elementor -
    github.com/orgs/elementor/discussions/22156

  • @baliflorent6971
    @baliflorent6971 Год назад +1

    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.

    • @daveden2
      @daveden2  Год назад

      Once I run some more tests, I'll update the post / release a follow up video

    • @baliflorent6971
      @baliflorent6971 Год назад

      @@daveden2 ok

    • @daveden2
      @daveden2  11 месяцев назад +1

      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

    • @gonzalorozas1769
      @gonzalorozas1769 7 месяцев назад

      @@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!

    • @daveden2
      @daveden2  7 месяцев назад +1

      @@gonzalorozas1769 did you set the date format to Y-m-d?

  • @YuukaleNarmo02
    @YuukaleNarmo02 7 месяцев назад

    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?

    • @daveden2
      @daveden2  7 месяцев назад

      To the best of my knowledge, the Elementor loop grid doesn't work well with repeater fields.

  • @nsa5
    @nsa5 4 месяца назад

    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

    • @daveden2
      @daveden2  4 месяца назад +1

      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.

    • @nsa5
      @nsa5 4 месяца назад +1

      @@daveden2 thanks Dave! Yes at the moment I’m currently utilising your suggested method 1. It’s a tricky one

  • @JonathanCetti
    @JonathanCetti 8 месяцев назад

    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?

    • @daveden2
      @daveden2  8 месяцев назад +1

      You can try this modified query, where the query id is 'dd_order_id' and the ACF field is 'event_order_id'

  • @JunReyViajedorOfficial
    @JunReyViajedorOfficial 7 месяцев назад

    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.

    • @daveden2
      @daveden2  7 месяцев назад

      I'm glad that the videos have been helpful.
      I'll try to work on a start-to-finish video.

  • @cristianpacher9992
    @cristianpacher9992 8 месяцев назад

    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
      @daveden2  8 месяцев назад

      Yes, you'd have to create an array for the orderby in the query.
      What type of acf field is the hour field?

    • @cristianpacher9992
      @cristianpacher9992 7 месяцев назад

      ​@@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

    • @daveden2
      @daveden2  7 месяцев назад +1

      @@cristianpacher9992 okay, I'll look into it and get back to you soon

    • @daveden2
      @daveden2  7 месяцев назад

      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
    @harvinderdhami9795 7 месяцев назад

    How can we use this for a checkbox field? If I wanted to sort posts that have the checbox marked to display last?

    • @daveden2
      @daveden2  7 месяцев назад +1

      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?

    • @harvinderdhami9795
      @harvinderdhami9795 7 месяцев назад

      @@daveden2 Would be greatly appreciated. No there is only a single checkbox that is called "Status" and it has a value of "Sold"

    • @daveden2
      @daveden2  7 месяцев назад +1

      @@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/

    • @harvinderdhami9795
      @harvinderdhami9795 7 месяцев назад

      @@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

    • @daveden2
      @daveden2  7 месяцев назад +1

      @@harvinderdhami9795 , thanks for the heads-up. My host changed their ip. I'll get it sorted asap

  • @tiagolacerda77
    @tiagolacerda77 8 месяцев назад

    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!

    • @daveden2
      @daveden2  8 месяцев назад

      That could be from an Elementor addon. On your plugins page, do you have a plugin like Advanced Queries?

    • @tiagolacerda77
      @tiagolacerda77 8 месяцев назад

      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. 😬

    • @daveden2
      @daveden2  8 месяцев назад +1

      @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

    • @fonty.visuals
      @fonty.visuals 7 месяцев назад

      I'm also unable to find "Query ID" :/

    • @daveden2
      @daveden2  7 месяцев назад

      @@fonty.visuals, are you also using Advanced Queries?

  • @daveden2
    @daveden2  Год назад

    What's your preferred plugin for creating CPTs and Custom Fields?

    • @shahinulislam9304
      @shahinulislam9304 Год назад +1

      CrocoBlock

    • @daveden2
      @daveden2  Год назад

      ​@@shahinulislam9304JetEngine is really powerful

    • @LudovicCharlier
      @LudovicCharlier Год назад +1

      JetEngine :) But I like the new interface of ACF.

    • @daveden2
      @daveden2  Год назад

      @@LudovicCharlier yeah, me too. The new ACF interface looks really nice

  • @andrewnull6829
    @andrewnull6829 11 месяцев назад

    Can you post the code to change status to draft? or where you found it?

    • @daveden2
      @daveden2  11 месяцев назад

      Thanks for the reminder. I'll update my post as soon as I can.

    • @daveden2
      @daveden2  11 месяцев назад

      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

  • @yerkobrowton3234
    @yerkobrowton3234 8 месяцев назад

    Gracias Crack!!, 🤯🙏

  • @hasanghazali1843
    @hasanghazali1843 Год назад

    How to show all posts without the array 'compare'?

    • @daveden2
      @daveden2  Год назад

      Simply remove the meta_query

  • @engsites
    @engsites 10 месяцев назад

    This is exactly what I needed