CPTs, Templates, Loops, & Logic: The Makings of a Modern Dynamic Website (Part 3)

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

КОМЕНТАРІ • 140

  • @ManolisGerakakis
    @ManolisGerakakis 3 місяці тому +3

    I wasn't able to find the "children-only" query script in the description so I am leaving it here in case someone else is looking for it:
    return [
    'post_type' => 'your_post_type_slug',
    'posts_per_page' => -1,
    'post_parent__not_in' => array( 0 ),
    'post_status' => 'publish',
    ];

    • @sajidnoob
      @sajidnoob 2 місяці тому

      thank you, the hero we needed

    • @ManolisGerakakis
      @ManolisGerakakis 2 місяці тому

      @@sajidnoob ✌

    • @Bobby-q6h
      @Bobby-q6h Місяць тому +1

      Core Framework, Relume, and Webstudio are far better approach than what Kevin is peddling. Explore the options!

    • @ManolisGerakakis
      @ManolisGerakakis Місяць тому +1

      I don't understand your comment to my comment. Kevin is showing ways to do things for people that use WordPress. And by the way, the tools and apps you mentioned are not related to each other.

    • @sajidnoob
      @sajidnoob Місяць тому

      Yea I decided to go with Wordpress getting into builds, so this is what I know now, and I don’t even do it that well

  • @kvndev
    @kvndev 5 місяців тому +28

    You can pay hundreds of dollars for a wordpress course, but none of these teaches you these techniques, meanwhile Kevin delivers this gem for free to the internet. I can only repeat myself: INSANE value again! Hyped for the next episode.

    • @Bobby-q6h
      @Bobby-q6h Місяць тому

      Core Framework, Relume, and Webstudio are far better approach than what Kevin is peddling. Explore the options!

  • @PeterFallenius
    @PeterFallenius 4 місяці тому +10

    0:00 Intro
    1:26 Service Area Network Structure
    2:38 Service Area CPT
    4:06 Hierarchical CPTs/Nested Posts (Parent/Child)
    10:19 Parent/Child Exclusive Query Loops
    11:49 Parents-Only Loops
    13:10 Children-Only Loops
    15:19 Nested Loops
    24:18 Parent/Child Template
    27:47 Template Conditional Logic
    Great video.
    Thank you.
    Added the time stamps for myself, and maybe useful for someone else. 😀

    • @Bobby-q6h
      @Bobby-q6h Місяць тому

      Core Framework, Relume, and Webstudio are far better approach than what Kevin is peddling. Explore the options!

  • @amrfarrouh
    @amrfarrouh 5 місяців тому +9

    The Best Custom Post Type tutorial and explanation ever, Thank you for you time and Tips with a simple way , I can't wait for Part 4!

    • @Gearyco
      @Gearyco  5 місяців тому +1

      You're very welcome!

  • @DavidWhiteGives
    @DavidWhiteGives 5 місяців тому +9

    Yes! At last. I have been waiting for this. Loved 1 & 2. 3: Platinum material!

  • @paulburgess4954
    @paulburgess4954 Місяць тому

    Fantastic content as always, I'm learning so much from your dynamic content training, thank you so much Kevin!

  • @MarciaRobinsonz
    @MarciaRobinsonz 4 місяці тому +3

    This series started off as "oh this is good to know" and has quickly developed into "oh this is stuff everyone MUST know" -- it almost feels like PB201 and the mandatory training for everyone who completes PB101. Thank you for doing this and I excitedly cant wait for Part 4 (and every other video to come)

    • @Gearyco
      @Gearyco  4 місяці тому

      It’s taken on a life of its own!

    • @Bobby-q6h
      @Bobby-q6h Місяць тому

      Core Framework, Relume, and Webstudio are far better approach than what Kevin is peddling. Explore the options!

  • @marcorunsyay
    @marcorunsyay Місяць тому

    Kevin is one of the funniest people in Tech UA-cam. Another great video.

    • @Gearyco
      @Gearyco  Місяць тому

      🙏

    • @Bobby-q6h
      @Bobby-q6h Місяць тому

      Core Framework, Relume, and Webstudio are far better approach than what Kevin is peddling. Explore the options!

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

    The worst part about how good this series is, is waiting for all of the episodes to come out. Love the work. Thankyou Kevin Geary this is the exact tutorial series I needed to put all of the stuff I have learnt from you together.

    • @Bobby-q6h
      @Bobby-q6h Місяць тому

      Core Framework, Relume, and Webstudio are far better approach than what Kevin is peddling. Explore the options!

  • @kristapsvilcans
    @kristapsvilcans 5 місяців тому +3

    Great series, can't wait next episode about unique layouts per post in a custom post type

  • @davidwalls2304
    @davidwalls2304 4 місяці тому

    Absolutely great episode. I never really knew how to create query loops within query loops before and this really explains how to easily structure the service area network. Each episode in all of the series of tutorials gets better and better and provides so much information. Platinum level content -- hell yes! I can believe it's free because you create so many videos/tutorials for everyone to learn so many different topics to improve website builds/structures/approaches. However, I can't believe this is free because this content is priceless if you want to understand best practices. Great job, as always, explaining this at an elementary level.

  • @dahunsi
    @dahunsi 5 місяців тому +2

    This is one lesson I have been looking forward to. Definitely will be watching it again. There is so much happening in gearysphere right now. Just etching to go. Thanks a lot Kevin.

  • @Michael-Copenhagen
    @Michael-Copenhagen 4 місяці тому

    This series is excellent and unique. Kevin, you help so many people reach a new level of dynamic page building. That is a truly extraordinary contribution to WordPress and the community. Thank you.

  • @eduard_dev
    @eduard_dev 5 місяців тому +1

    This video absolutely earns a perfect 10/10! 🙌 It’s simply wonderful and always engaging!

  • @SigururHolmGunnarsson
    @SigururHolmGunnarsson 4 місяці тому

    I just finished watching this series for the second time, and this time I followed along using Bricks Builder. Your teaching is exceptional-I learned a great deal. Thank you!

    • @Gearyco
      @Gearyco  4 місяці тому

      Great to hear!

  • @Adam.3313
    @Adam.3313 3 місяці тому

    Thank you for your effort. Really good teacher.

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

    Thank you Kevin for coming back with part 3, I'll need to see it more than twice as there is so much practical advice here I want to absorb. 1 & 2 are almost absorbed after a little practice - I feel my Numptiness falling away. Great work!

  • @DEBUGENTITY
    @DEBUGENTITY 4 місяці тому

    Finally someone teaching dynamic contents. Great

  • @Samanticsweb
    @Samanticsweb 4 місяці тому

    This is good stuff!
    Needed it months ago when I was struggeling to get the right URLs of the children. Also i've spend DAYS (😅) figuring out how to make a different template for the children of the parent.
    I remember asking this in the Inner Circle and no one was able to provide me with the answer.
    This video is a good reminder and workaround! 🎉

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

    The timing of this is perfect! I'm working on a personal project and this will absolutely will work for what I have in mind. Thank you SO much for taking the time to put these videos together!

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

    Absolutely brilliant tutorial Kevin. Totally appreciate your effort in doing these!

  • @ManolisGerakakis
    @ManolisGerakakis 5 місяців тому +1

    Yet another great tutorial Kevin. Can't wait for your video on templating with conditions!

  • @avdherik
    @avdherik 4 місяці тому

    Very valuable video in this series!! Many thanks!

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

    Yet another fantastic, informative and engaging video. Pure gold or should that be platinum

  • @JohnSheldon1
    @JohnSheldon1 4 місяці тому

    Still amazed and learning each time I watch these videos

  • @sophiemulders
    @sophiemulders 4 місяці тому

    YESSSS gold!!! Love it. I was struggling with those loops and conditions!!!
    Also usable for Services with child services!! Etc. Thank you so much!!!

  • @SellyS.
    @SellyS. 4 місяці тому

    Golden! Thanks for this!

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

    This is so good! Thank you for posting these tutorials. Very much appreciated!

    • @Gearyco
      @Gearyco  5 місяців тому +1

      Glad you like them!

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

    It's a better idea to keep the Post Type Key semantic so that it's easier and more logical to find and deal with in the backend when building. You can change the URL slug part of the CPT independently of the Post Type Key by going to the "URLs" tab in "Advanced Settings" for the CPT, choosing "Custom Permalink" in the "Permalink Rewrite" dropdown, and then specifying your own custom URL slug. That way, the Post Type Key can continue to be "service_area" while its custom URL slug could be "in".

  • @abdulwaheedorg
    @abdulwaheedorg 4 місяці тому

    Honestly, I'm using ACF from past 2 years but still I wasn't aware of these use cases. Hats off

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

    Man, I wish this came out a month ago, did a lot of googling to figure it out. Great tutorial, now I can reference this video!

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

    This IS platinum level material. Oh yeah. So logic, so easy, but still you need to get it right. This video will serve as a good reminder on how to do it right.

  • @eucalyptech
    @eucalyptech 4 місяці тому

    Great explanations, thank you Kevin !

  • @marko.alilovic
    @marko.alilovic 4 місяці тому

    Good job, Kevin, thanks! 😁🫶

  • @DQime
    @DQime 4 місяці тому

    Cant wait for the next video!😊

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

    Another golden nugget right there! Thank you so much Kevin 🙌🏻

  • @robbie0872
    @robbie0872 4 місяці тому

    Can't wait for Part 4!

  • @flatmonk3y
    @flatmonk3y 5 місяців тому +2

    Thank you so much for your time and great explanations.

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

    I'm looking forward SO MUCH to look at this video :) Again, thank you a lot for all your work.

  • @zuber7358
    @zuber7358 4 місяці тому

    Incredible value for free ❤‍🔥

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

    You are doing an excellent job! As always.

  • @andreibolanu
    @andreibolanu 26 днів тому

    Hey Kevin, I am silently consuming all your videos. This series are making quite the right fit for me. Thank you so much! Do you have an ETA for video 4? I need to see how CPT's works with forms (I have WSForm). Thanks!

  • @jzajzz
    @jzajzz 5 місяців тому +4

    Not sure if I missed it..but how do you decide to use parent and children post vs taxonomy and sub taxonomies? ... What's the best practice or is it a judgment call?

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

      Yes I was gonna ask this. I will just use post taxonomy and sub taxonomies

    • @JacobBall75
      @JacobBall75 5 місяців тому +1

      Add me to the list that would like some direction on this too. Thanks for making the question clear too - I was working out how to ask the same question when I saw yours.
      I’m building a site that has products (versus cities) and product categories (versus states), but I’ve used taxonomies for the categories rather than a parent post structure.

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

      Stay tuned!

    • @Elsteck
      @Elsteck 4 місяці тому

      Same question, wondered if it was for tutorials sake, and a great tutorial it is, I will stay tuned for sure

  • @bloggerkickstart9060
    @bloggerkickstart9060 2 місяці тому

    Currently, trying to replicate this structure for directories. Therefore, need the 4th episode. That would be crucial moving forward

    • @Gearyco
      @Gearyco  2 місяці тому

      I did a directory tutorial in the inner circle FYI

  • @Aroenias
    @Aroenias Місяць тому

    Just making sure you're not fighting for your life on your own bro, thanks again! Waiting for video #4! Also... Stay off the snow ;) JK, but seriously...

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

    Thanks, Kevin! This series of CPTs has proven so valuable to my education. A very qick question...Is his all doable in Metabox? You have been a treasure-trove of information. Thanks again!

  • @DanielNeubauer
    @DanielNeubauer 4 місяці тому

    Awesome video Kevin. Keep them coming.
    Maybe in the next one you can share how you would tackle it when you have multiple services. In this example we have dog training - what if we had dog training and cat training - how would you tackle the state plus city plus service page setup then?

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

      Taxonomy has hierarchy as an option. Make dog training a parent and cat training a parent.
      Now we just need a world where cats are trainable 🤣

    • @DanielNeubauer
      @DanielNeubauer 4 місяці тому

      ​@@Gearyco True - the example was bad I admit ;-) - so we would need a taxonomy for dog training and one for cat training and then we would assign each new location page to one of those taxonomies? Is that what you mean?

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

    Are you planning to add a video in this series explaining your new concept of Services as a Taxonomy?

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

    You are awesome. Thank you so much for these!

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

      Glad you like them!

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

    This is gold, thank you!

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

    I'm curious why didn't you put the conditional logics to the sections? You first wrapped them in a block to put a condition on them

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

      Yeah so you can put multiple sections in each block if needed and there’s still only one conditional logic rule

  • @kodyleek
    @kodyleek 4 місяці тому

    Dropping a comment… to know if ep.4 coming soon 😉

  • @andrew.schaeffer4032
    @andrew.schaeffer4032 5 місяців тому

    Great stuff thanks! Very useful.

  • @JoergKlausFrye
    @JoergKlausFrye 4 місяці тому

    Hey Kevin, once again really great stuff. 👍 I didn't know about setting up a dynamic URL structure like that with parents and children. I'm currently working on a page: glasses, brands and lots of articles, so domain/brands/brand-name/article. Maybe that's an alternative? I'm already working on URL rewrite rules.

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

    Awesome stuff, Very useable

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

    17.3k subs. Think of all the chumps missing this. You should easily be over 500k. Never seen anything like this...not even in paid courses.

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

      It’s constant disrespect 🤣

  • @ranmaron
    @ranmaron 2 місяці тому

    @kevin Geary, I don't see part 4 did you post it?

  • @thorsten-roever
    @thorsten-roever 4 місяці тому

    Thanks

  • @osvaldoodon
    @osvaldoodon 2 місяці тому

    Great video as always 👏👏👏👏. Thanks. I'd like to add some related fields to a Woocommerce product using relationships. For example instructions, faq, etc for each product so I can create a general template to shows this fields only if has registered. Is there something else I should change to work with related fields and conditions? Or is a similar approach of this video?

    • @Gearyco
      @Gearyco  2 місяці тому

      Should be pretty straightforward

  • @bluetheredpanda
    @bluetheredpanda 4 місяці тому

    Another banger 😁

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

    Thanks for great tutorial and showing a way to use hierarchical post types. Will it also work with filter- and pagination elements for the child results? Maybe an idea for an upcoming tutorial 🙂

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

    Cool insights 🙂

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

    Loving the series so far. Quick question, what is the benefit of using parent/child pages vs categories/tags taxonomies to create states and individual CPT's as city pages.

    • @Gearyco
      @Gearyco  5 місяців тому +3

      It's an alternate approach that I'm going to cover later in the series, but it presents challenges when you're using taxonomies for other things (like services). As I mentioned in the video, there's no obviously clear way to set this up in WP because WPs architecture is archaic. Everything requires tradeoffs and workarounds.

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

    Is this the better way to maintain the data? Or the one you showed for the new Frames website?

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

      Stay tuned!

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

    yes!!! Thanks so much
    any chance on the figma file as a reference

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

      Not sure what you mean?

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

      @@Gearyco The figma file shown at 4:50 in the video

  • @Simon-sly
    @Simon-sly 3 місяці тому

    This is so helpful. What advice can anyone give on the content of the service area page? From an SEO point of view, is it ok to have the same or very similar copy on every city page?

    • @Gearyco
      @Gearyco  3 місяці тому +1

      SHould be as unique as possible.

  • @Mallory796
    @Mallory796 4 місяці тому

    So good.

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

    Great video! I genuinely value the wealth of information you provide. I have a question: Is this the optimal method for handling cities when creating a service listing directory similar to "Yelp," or would it be better to use taxonomies?

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

      Pros and cons everywhere. We will talk about it more later .

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

    Amazing stuff. I have downloaded the videos so that they cant disapear from me if they would get deleted for some reason.

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

    Is there any advantage/disadvantage of setting the Service Area slug as "in" as the post key over setting in in the URL's setting an set the Permalink as "custom" and put "in" in there?
    I just like to set my post type keys to use the same name as the post type, then set the permalink to use in the URL's tab.

    • @Gearyco
      @Gearyco  5 місяців тому +1

      You can do whatever you want. It requires more PHP requests to rewrite it I’m sure but not sure what the actual performance implications are, if any.

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

    Is the city page seen as the a "Home" page that is scoped to that city? I think you have mentioned in the past you have said for SEO, you should have service pages under each service area, in this example, the cities. So you would have "Global" service pages, but then have "Atlanta" Service Pages. Would those scoped service pages be children of the "City" pages, or would they be their own separate post type?

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

      There are a few ways to do it. There’s no official method. We discussed pros and cons of each in inner circle. Depends on how many services you have and how granular you want to get.

  • @MarkWilliams77
    @MarkWilliams77 Місяць тому

    19:48 - no way I was gonna find that about the {post_id} lol - don't worry Kevin, we're fighting on the same streets you are haha 💪

  • @themikesantos
    @themikesantos 4 місяці тому

    Was there anything that made you decide to switch to using an archive page rather than creating it as a page like you did in the past? With all the templates we end up creating (including sections) it gets messy to find in Templates. That was the logic before at least.

    • @Gearyco
      @Gearyco  4 місяці тому

      This is a builder/WordPress problem. It can be fixed.

    • @themikesantos
      @themikesantos 4 місяці тому

      @@Gearyco is there a fix or teasing a solution?

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

    Very clever

  • @sajidnoob
    @sajidnoob 2 місяці тому

    I need more, i liked, subscribed, purchased your tools, come on brother don't slack, you need some more of that white stuff, I can feel your nose itching.

  • @sajidnoob
    @sajidnoob 2 місяці тому

    when I save, how come my archives don't update immediately? I can never see how it looks on the front page until sometimes hours later. Noob here sorry ^__^

  • @chariszapitis
    @chariszapitis 5 місяців тому +1

    💎Gem tutorial for sure! You have earned the like and a bell notification!👍🔔 Let's take this to the next level.🆙 Let's change the CPT "Team" to "Persons," and we have, for example, 1. Dog Trainer 2. Veterinarian 3. Groomer. How are you going to approach this? Creating categories, or will you have a dropdown custom field to choose the type of "Person"? All Persons share some common custom fields like "Name" and "Surname," but they also have their own unique custom fields. Persons have relationships with locations and services. So, when you create a new location, you can "pull data" for "persons" and "services." Also, if I want to show only the "type person - Groomer," what would the if condition be?

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

      Team works just as well. Then yes you can categorize them.

  • @davidopyt4278
    @davidopyt4278 4 місяці тому

    geo geary chacha

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

    Would you be interested in teaching us how to use API using bricks? I think no one has good cover of the api integration with website like maybe using chatgpt api maybe
    Im feeling even though wordpress is old, but not for CRM it is old for all modern functionality one of them is API

  • @TheSamGames
    @TheSamGames 4 місяці тому

    Upload part 4 please

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

      Kevin I think its time for Part 4..................RIght? | Everyone is waiting.......

  • @DearFrench
    @DearFrench 4 місяці тому

    Invaluable! 🙏
    Kevin, how would you order cities states and their children cities from A to Z (as follows)?
    FLORIDA
    Coral Gabbles
    Hialeah
    Miami Beach
    GEORGIA
    Atlanta
    Macon
    Savannah

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

      Use the loop order by name

    • @DearFrench
      @DearFrench 4 місяці тому

      @@Gearyco 🙏

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

    17 iMessages. What's up with that?

  • @keaton718
    @keaton718 4 місяці тому

    So is there a solution to eventually ending up with hundreds of posts and thousands of child posts after certain sites are operating for a few years? Is there at least a way to collapse children.

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

      Wordpress needs a lot of basic CMS improvements :/

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

    Kevin, I appreciate the work you do. I benefit a lot from it.
    BUT... I'm starting to get tired of your constant WordPress rants. YOU are a WordPress user. And last I checked, WordPress is open source and accepts contribution from the community. If you and other creators know how to fix the problems of WordPress, why not contribute? If your contributions are not implemented, that's something to rant about.
    Constantly criticizing an open source software doesn't even make you sound that smart.
    Don't get me wrong, I appreciate what you do with the products you develop, but not how you're handing out criticisms! You can do better.

    • @Gearyco
      @Gearyco  5 місяців тому +2

      We’ve contributed so much.

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

    How would one approach this parent-child structure if there are deeper levels? So for example parent-child-child. 3 Levels deep, which conditions do I apply then so that the 3rd (which is the actual post) get's a completely different design?

    • @Gearyco
      @Gearyco  5 місяців тому +1

      The more levels there are, the tougher it gets. Both WordPress and Paige builders have some limitations that you will have to work around.

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

      @@Gearyco Would be great if you could pick this up in the next video or maybe explain in a little comment 😇