EVENTS CALENDAR WITH ACF & LOOP GRID - show ONLY future events starting with current date

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 76

  • @andreaegli
    @andreaegli  Рік тому +14

    Have you found this useful? Would you like to see more complex videos around ACF?

  • @geoffreylowthian9032
    @geoffreylowthian9032 4 місяці тому +2

    Your code snippet was a lot easier than what i did in the past, thank you for this!

  • @JoshuaG109
    @JoshuaG109 Рік тому

    Wow, you've truly rescued me! I've been searching for a solution to this for a while. I feel incredibly fortunate to have stumbled upon your video. Thank you immensely! I've subscribed!

  • @designricko
    @designricko Рік тому +1

    Andrea, I just love your channel so much. We need more content like this about wordpress, to differentiate our projects. Most wordpress content on youtube is about basic stuff or templates, but you teach us something awesome!
    keep doing it please

    • @andreaegli
      @andreaegli  Рік тому

      Thank you so much, Ricko! Yeah, I saw that there was a lack of ...let's call it spice in the WP design community and I said, I might as well have a go at it. I love what web designers are doing with Webflow and I use that as inspiration for what I teach on this channel. We definitely need the basic stuff too but we need to move away from the basic WordPress cookie-cutter designs in this day and age otherwise we'll be left behind. Let me know if you have any requests for future videos🤓

  • @TrishaLeconte
    @TrishaLeconte Рік тому +1

    YES! Exactly what I needed to learn! I just launched a website that I used ACF to create events. Now I can go back and add that code! LOL. WOW. Yes keep doing more of all these videos you're doing. Totally in alignment with what I need to know! Thank you!

    • @andreaegli
      @andreaegli  Рік тому

      YAY! I'm a mind reader! LOL!!! so happy this helped you and I will keep making these kind of videos🤩

  • @chrispineokoth
    @chrispineokoth 10 місяців тому

    You're a life saver! After months of trial and error, this worked like a charm!

  • @WilliamMarshall
    @WilliamMarshall 5 місяців тому

    This is the best tutorial on this topic that I've found. Thank you.

  • @francisthore6145
    @francisthore6145 Рік тому +1

    Thank you. I managed to follow your tutorial and got things working fine. I added custom querys to order by upcoming date also. Thank you very much.

    • @andreaegli
      @andreaegli  Рік тому

      Hey, that is awesome! Could you share the custom queries with me? You are very welcome!

    • @lefterist.5471
      @lefterist.5471 11 місяців тому

      Hi friend can you share the code because whatever i try i can't make it work!

    • @francisthore6145
      @francisthore6145 11 місяців тому

      Hi@@andreaegli I am sorry I just saw this reply now, I tried writing the steps and code in this google doc docs.google.com/document/d/1zTD_RIq2iC7Ajmx4nFyJzVHirMlSDZALFw5uFPFJ07w/edit?usp=sharing

    • @lefterist.5471
      @lefterist.5471 11 місяців тому +2

      never mind i found it,
      add_action( 'elementor/query/filter_date', function( $query ) {
      $today = date('Ymd');
      $meta_query = [
      [
      'key' => 'date', // replace 'date' with the key of your date custom field
      'value' => $today,
      'type' => 'DATE',
      'compare' => '>=',
      ]
      ];
      $query->set( 'meta_query', $meta_query );
      $query->set( 'orderby', 'meta_value' ); // Order by the value of the meta field
      $query->set( 'meta_key', 'date' ); // Replace 'date' with the key of your date custom field
      $query->set( 'order', 'ASC' ); // Order posts in ascending order based on the date
      } );
      this code works (at least for me)

  • @peteharrison3241
    @peteharrison3241 Рік тому +1

    If you look at the title of the date format section on the date field, it says 'Display Format' which isn't how a date is stored, just how it's formatted when displayed. Almost ALL dates are stored as YMD as it's more efficient.

  • @CreadoresWebSevilla
    @CreadoresWebSevilla 29 днів тому +1

    Great for you¡¡¡ lovely tutorial. Resolved my problem. Thanks

  • @Gabrielle-t6d
    @Gabrielle-t6d 5 місяців тому +1

    THANK YOU! This is so so helpful. Game changing.

    • @andreaegli
      @andreaegli  5 місяців тому

      You are very welcome 🤗

  • @oluwaseunfasanya2487
    @oluwaseunfasanya2487 8 місяців тому +1

    Life saver . Thank you so much for sharing

    • @andreaegli
      @andreaegli  8 місяців тому

      😌 you’re very welcome

  • @dbspaintball
    @dbspaintball 2 місяці тому +1

    Thank you!

  • @punanislayer
    @punanislayer Рік тому +1

    this is what i am looking for - thanks

  • @zoeyplatt6163
    @zoeyplatt6163 Рік тому +1

    This is great! One question though - Would it be possible to show the upcoming events in one section, but then also have past events only listed in another section?

  • @kamessytta
    @kamessytta Рік тому +1

    Good job, keep up the good work! ☺️👍👏👏👏👏❤️❤️🥰

    • @andreaegli
      @andreaegli  Рік тому +1

      thank you, Kamy! will do🤩

  • @FloreHervy
    @FloreHervy Рік тому

    Thank you so much for your tutorial, how can I change the code to ask it to focus on passed events instead of future events ?

  • @RealJabran
    @RealJabran Рік тому +2

    Thank you, great Job! Is it possible to create a link to calendar? For example, I click on a button and it automatically open the Google Calendar and ask for saving the event?

    • @andreaegli
      @andreaegli  Рік тому +1

      Thank you 😀 yes, but it’s quite complicated to do that. I will look into it and see if I can get that done

  • @simonegle
    @simonegle Рік тому +1

    Hi Andrea, thanks for the great video. I have a question: Do you see the possibility to add repeating events via ACF somewhere? Maybe someone else has an idea? 😃

    • @andreaegli
      @andreaegli  Рік тому

      Hey Simon, thank you 😊 I’m sure there’s a way but I don’t know off the top of my head. Anyone else? Welp 🤓

  • @LaRevedereBunica
    @LaRevedereBunica Рік тому

    Hi I am currently following this tutorial, I'd like to know how I can add a format date with a start date and an end date for events that are on several days ? I'd like the date to be "from xx/xx/xx to xx/xx/xx"

  • @ndelcastillo1995
    @ndelcastillo1995 Рік тому

    Hi Andrea, nice video! My only issue is, how can i add this template of Meeting to mi Wordpress Menu?

  • @lefterist.5471
    @lefterist.5471 11 місяців тому

    Hi,
    Thank you for your videos realy helpfull! One question is it possible to make the order list with the date of the event and not the date that was published??
    Thank you!
    (also is there a way to make the event page editable by elementor? I am creating a secont page to redirect the event to the page i want to make the design as i like and it is realy time consuming)

  • @scorpio251068
    @scorpio251068 Рік тому +1

    I set in the advanced configuration has archive. Is there a reason why you didn't set this for the post type?

    • @andreaegli
      @andreaegli  Рік тому

      I guess I just overlooked it ☺️

  • @jean-mahmoud_du_tacobel
    @jean-mahmoud_du_tacobel Рік тому +1

    Merci, tu es au top 🤜🤛

    • @andreaegli
      @andreaegli  Рік тому +1

      Merci! Je vous en prie 🤓

    • @jean-mahmoud_du_tacobel
      @jean-mahmoud_du_tacobel Рік тому +1

      @@andreaegli you speak french very well it's a pleasure for me 🤜🤛your best fan from France ⚜️❤️

    • @andreaegli
      @andreaegli  Рік тому +1

      @@jean-mahmoud_du_tacobel my french is a bit rusty but google translate helped a bit

    • @jean-mahmoud_du_tacobel
      @jean-mahmoud_du_tacobel Рік тому

      @@andreaegli Well, i'm sure you are also beautifull than your french is too

  • @jillciporin8511
    @jillciporin8511 Рік тому +1

    Andrea - This was exactly what I needed! A way to show current and future events but not past! But now if I want to show only past events but not future in another area of my website, can I use the same code but alter it and create a new query ID? How would I alter the code?

    • @andreaegli
      @andreaegli  Рік тому

      Hey Jill! So happy to hear that it helped you ☺️ you can create a new query ID and simply add all past events in the backend. No need to use the code in this case.

    • @jillciporin8511
      @jillciporin8511 Рік тому +1

      ​@@andreaegli Not sure how to "add all past events in the backend"?

    • @andreaegli
      @andreaegli  Рік тому

      @@jillciporin8511 add them just like you have added the current and future events

    • @jillciporin8511
      @jillciporin8511 Рік тому +1

      Hi, Andrea - do you have any idea why this recently changed? Only Future dates do display, so that works...but they are not in the correct order? Whether I do ACS or DCS, the order of the my next four dates show up in this order: September 27,. September 13, October 25, October 4. How do I get them to display in chronological order?

    • @andreaegli
      @andreaegli  Рік тому

      Hey Jill! Have you added them at the same time? the problem with this solution is that you need to add the events all at the same time in chronological order. Any event you add afterwards will show up last even if the date of the event is not last.

  • @PaulShadwell
    @PaulShadwell Рік тому +1

    This is exactly what I was looking for to solve a problem I had. Is there a way to do this without using Elementor? I use Gutenberg.

    • @andreaegli
      @andreaegli  Рік тому

      Hey Paul! Hmmm, I'm sure it works with Gutenberg but I have no idea how to display the info...I think ACF have a version of blocks coming out in November...

  • @colinbateman4609
    @colinbateman4609 Рік тому +1

    Hi Andrea, thanks for this tutorial, it's given some great ideas, however, I am struggling with one part of the build, at roughly 7.00 into the video you say "OK let's move on to Elementor and add our loop grid" I can't figure out where this is, ie are you building a template? is it a loop item, a container, a section, etc, I just cant see where to add a loop grid? Thank for any help.

    • @andreaegli
      @andreaegli  Рік тому

      Hey, Colin! Glad to see that you have found this useful! Ok, most probably you have not activated the Loop feature in Elementor. So, go to Dashboard > Elementor > Settings > Features and scroll all the way down until you see Loop. Turn that bad boy on and then go back to your Elementor editor and look for the loop grid widget. From here you can follow along with the video. Let me know if you need more help

    • @colinbateman4609
      @colinbateman4609 Рік тому

      @@andreaegli Sorted many thanks Andrea

  • @EmilVettainen
    @EmilVettainen Рік тому +1

    Is it possible to choose AJAX for pagnination prev/next ? like load more ?

    • @andreaegli
      @andreaegli  Рік тому

      Yes, you can, the loop builder has that option which is pretty good. Have you managed to fix the date custom post type not showing up? I was going to reply to your comment but i guess you deleted it...

    • @EmilVettainen
      @EmilVettainen Рік тому +1

      @@andreaegli yeah i fix the date issue, but the pagnination on prev/next update the url when using, so its not on ajax... like load more it dont update the url.

  • @papayawebmedia
    @papayawebmedia Рік тому

    Hi, thanks for the excellent tutorial. There is one small detail: If I have an event on June 5, 2023 and another on February 10, 2024 the 2024 event appears first in the list. Any recommendation? Thank you.

    • @JoshuaG109
      @JoshuaG109 Рік тому

      Try this:
      add_action( 'elementor/query/filter_date', function( $query ) {
      $today = date('Ymd');
      $meta_query = $query->get( 'meta_query' );
      $meta_query = [
      [
      'key' => 'event_start_date', // Replace with your custom field name
      'value' => $today,
      'type' => 'DATE',
      'compare' => '>=',
      ]
      ];
      $query->set( 'meta_query', $meta_query );
      $query->set( 'orderby', 'meta_value' ); // Sort by the custom field 'event_start_date'
      $query->set( 'order', 'ASC' ); // Sort in ascending order (earliest date first)
      } );

  • @muhammadmaaz6119
    @muhammadmaaz6119 Рік тому +1

    #andreaegli Thanks for the useful videos but I want to ask if I want to show only the current date post it depends on Day, not the year just like the celebrities' birthday website

    • @andreaegli
      @andreaegli  Рік тому +1

      You're welcome! That is a bit more complicated and requires additional code

  • @bakis_music
    @bakis_music 10 місяців тому

    thank you very much!

  • @LaRevedereBunica
    @LaRevedereBunica Рік тому +1

    I don't know why but it filters my events by date of publication and not the date that I put in the event... Can you help me?

    • @andreaegli
      @andreaegli  Рік тому

      Hey Alina! I’m afraid seems the code has some issues and I haven’t had time to look into it. Can you send me an email with your exact issue and what you’re trying to achieve?

    • @LaRevedereBunica
      @LaRevedereBunica Рік тому

      I found a solution, thank you for your video, really helped me !

    • @sharonmac2899
      @sharonmac2899 11 місяців тому

      @@LaRevedereBunica I have the same problem. What was the solution?

    • @LaRevedereBunica
      @LaRevedereBunica 11 місяців тому

      Hi ! Have you been able to look into the code ? There is indeed a bug@@andreaegli

    • @JonEinarHjartarson
      @JonEinarHjartarson 10 місяців тому

      Hey guys Im having the same problem would love you all forever if you have a solution?

  • @HectorMRA
    @HectorMRA 10 місяців тому

    No mams te amo, gracias!

  • @SultanaRazia-jx8mk
    @SultanaRazia-jx8mk Рік тому +1

    ❤❤❤

  • @gabrielf7545
    @gabrielf7545 4 дні тому

    Thank you very much!