Build an incredibly flexible WordPress events calendar without any code

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 31

  • @okanime1
    @okanime1 11 місяців тому +1

    Thank you. The query string part has clarified some things I’ve been struggling with in my acf build. Thanks.

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

    Thanks Josh. This is fantastic! I've been using Modern Events Calendar plugin for a few clients that needed a more robust events calendar with booking and different displays. But, I have a client that just wants events listed with a link and a look that closely matches their branding. I had been manually designing each event page for them so this is the perfect way to let them post their own events. This is the perfect solution! There's no chance I would have figured out the query string on my own. Thanks again for another awesome tutorial.

  • @tom.2900
    @tom.2900 2 роки тому +1

    Brilliant! How had j never heard of CPT before?! Those queries are a big gap in my knowledge too. I've saved this video for future reference, thank you!

  • @scotbaston1018
    @scotbaston1018 2 роки тому +1

    Really good stuff Josh! Very helpful and nicely presented

  • @pixelvault2807
    @pixelvault2807 2 роки тому +1

    Nice work Josh.

  • @leanprogrammer
    @leanprogrammer 9 місяців тому +1

    great video! 👍 I'm guessing for appointments it would be a little bit more involved.. but nonetheless this is a good solution for when someone offers classes or multi day events..

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

    Man, your CS videos are so helpful!! Question, why can't the Query Builder do the queries you're adding here?

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

      Thanks @rspaulding! Appreciate the feedback.
      The Query Builder is great for setting up simple (even mildly complex) queries that tap into default data (posts types, taxonomies, publish dates, titles, etc.) and you can absolutely use it for building out your queries - but once we get into the weeds on some of the more advanced query functionality like orderby=meta_value and meta_key=acf_field we need to move to custom query strings.

  • @Kennyboy707
    @Kennyboy707 2 роки тому +3

    Great explanation of the query string and the meanings of the brackets code. Brilliant content and I think I'll give this a try on my dev site. What screen recording software do you use ?

    • @buildingonwordpress
      @buildingonwordpress  2 роки тому +2

      Thanks Kenny! To be honest, it’s just QuickTime Screen Recording (default for every Mac) + Pro Mouse ($3.99). Works wonders.
      apps.apple.com/us/app/pro-mouse/id1505869474?mt=12

  • @punanislayer
    @punanislayer 9 місяців тому +1

    thanks this is what im looking for

  • @dansimeone8225
    @dansimeone8225 4 місяці тому +1

    Hey Josh, I have just implemented this without any issues, great tutorial. Just wondering if you could help with extending this so that when no events are present (or more tot he point, when all events which could still be technically published but all are expired), a "there are no events to show, please check back later" message could be displayed. How can that sort of conditional logic be tooled in this use case?

    • @nickelsandgrind
      @nickelsandgrind 3 місяці тому

      Did you ever figure out how to do this?

  • @ALIKHAN-ug3xc
    @ALIKHAN-ug3xc 10 місяців тому +1

    Thanks a lot bro :)

  • @marchydecreative
    @marchydecreative 2 роки тому

    Thanks for the tutorial! Follow up question about archives. This works great when you're doing a low key calendar, but the part I'm struggling with is with the archive page. Because if I use your code, I can't have post navigation. Any thoughts? You mentioned that you did this for a client, so I'm curious about how you figured out the archive page/master calendar view. Thanks!

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

    great one! also usable with Wordpress Elementor?

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

      Thanks @Pixl -- I don't see why not. Same methodology should apply even if the process of application is slightly different.

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq 9 місяців тому +1

    I'm looking for how to create a calender in wordpress, but unfortunately all the tutorials are on how to create events

    • @buildingonwordpress
      @buildingonwordpress  9 місяців тому

      Not sure I'm following. Events take place on dates which makes this a calendar. That said, if you're looking for more of an actual calendar design (grid of boxes) that's a bit of a heavier lift.

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

    Hi, how to add bands or artists ?

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

      Hi @andrei - when adding the custom fields that we begin covering at roughly the 4:08 mark in the video - simply add custom fields for whatever additional details you'd like to include. For example, you could add a field for artist / band, you could add a field for venue address, you could add a field genre taxonomy, and so on and so forth.

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

      @@buildingonwordpress thx you, i want to create venue manager like with the events and on add a event page to have a selector to select the venue

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

    I should have watched this before going crazy for 6h straight to find out how to sort out custom posts by date. I'm just wondering now if it's possible do separate events by month, like a row for each month (or a slide in a slider). Any tips to achieve this?

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

      Thanks @RenanDadalte! That one definitely gets a bit tougher. I'd need to think through it a bit, functionally. I'm sure there's some way.

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

    Is there a way to filter by dates that havent happened yet in elementor?

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

    Can we set the query to show only the upcoming events within 10 days. and all other events remains hide

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

      Don't see why not. For that you'd likely want to jump into your functions.php. This is completely untested but perhaps something like:
      // Get today's date
      $today_date = new DateTime();
      // Calculate the date 10 days ago
      $ten_days_ago = $today_date->modify('-10 days')->format('Ymd');
      // Query to retrieve posts within the 10-day range
      $args = array(
      'post_type' => 'YOUR_CPT',
      'orderby' => 'meta_value',
      'meta_key' => 'YOUR_ACF_FIELD',
      'order' => 'asc',
      'meta_query' => array(
      'relation' => 'AND',
      array(
      'key' => 'YOUR_ACF_FIELD',
      'value' => $ten_days_ago,
      'compare' => '>=',
      'type' => 'DATE',
      ),
      array(
      'key' => 'YOUR_ACF_FIELD',
      'value' => date('Ymd'),
      'compare' => '