Custom Post Type / Custom Fields CRASH COURSE with GeneratePress & GenerateBlocks

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ค. 2024
  • If you've not yet dived into the world of Custom Post Types and Custom Fields - then I think you're missing out on one of the best features WordPress has to offer.
    In this crash course, I'm going to show you what custom fields and custom post types are, why they are so useful, and we'll build some from the ground up!
    - - - - - - - - - - - - -
    [ Video Created and Produced by Kyle Van Deusen ]
    💻 Visit Our Website: theadmin.bar/yt-tab
    🗨 Join Our Free Community: theadmin.bar/yt-community
    📨 Get the Best of The Admin Bar Delivered: theadmin.bar/yt-tfc
    🔁 Sell More Care Plans: theadmin.bar/yt-wom
    🧮 Use My Website Price Calculator: theadmin.bar/yt-calculator
    📜 Get My Proposal Template: theadmin.bar/yt-proposal
    ☑️ Get More Done with My Checklists: theadmin.bar/yt-checklists
    🔴 Live Event Schedule: theadmin.bar/yt-events
    🔧 The Tools I Use: theadmin.bar/yt-tools
    ⚡ My Agency, OGAL Web Design: theadmin.bar/yt-agency
    Timestamps
    00:00 Intro
    01:15 Examples
    06:13 Installing Plugins
    07:25 Creating a CPT
    09:04 Creating Custom Fields
    12:15 Creating the Single Post Template
    19:24 Creating a Loop Template
    22:46 Creating Custom Taxonomies
    26:20 Outro/Recap

ความคิดเห็น • 111

  • @TheAdminBar
    @TheAdminBar  ปีที่แล้ว +9

    If you benefit from this video, please do me a favor and hit the like button and consider subscribing. It helps a ton! ❤

  • @edwardrobson
    @edwardrobson ปีที่แล้ว +7

    This is the video I've been waiting for. Not because I don't understand CPT's but because you show how to use them them with GeneratePress/Blocks. Brilliant. Thank you.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Thanks, Edward! Glad you enjoyed! 🙌

  • @nicolawilliams1437
    @nicolawilliams1437 หลายเดือนก่อน

    All your tutorials are really great. This one in particular is so helpful! Literally saved me days 🙏🙏

    • @TheAdminBar
      @TheAdminBar  28 วันที่ผ่านมา

      Wahoo! So glad they are helpful! 🙌

  • @dautoviq
    @dautoviq ปีที่แล้ว +4

    Dude. After struggling so long I FINALLY did what i wanted to do. I have a travel site and was really struggling with WP all import and getting the hotel listings in the correct design including custom fields. You have saved me so much time. My gratitude is infinite.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Ahhhh wow, that makes me so glad to hear that!!! 🙌 Glad it was helpful!

  • @wohfab
    @wohfab ปีที่แล้ว

    AMAZING. This is getting easier with every update to these plugins. It is an incredibly powerful yet lightweight combination of plugins to do 99 % of what you could want to do with a website. Thank you so much for that video :)

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      It's really good stuff! I'm glad you enjoyed!

  • @dexafio
    @dexafio ปีที่แล้ว

    Great tutorial again, I´ve never understood CPT and ACF. Thank´s a lot Kyle. :)

  • @shekharkashyap481
    @shekharkashyap481 ปีที่แล้ว

    This is so helpful and clear. Thanks a lot

  • @melaniesmalldesign
    @melaniesmalldesign ปีที่แล้ว

    I'm loving cpt + acf + filter everything. Almost done with a business directory.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Woot! I need to redo the TAB job board directory. That was actually the FIRST site I built with blocks (and it looks like it 😅)

  • @IvanOung
    @IvanOung ปีที่แล้ว

    I just want to say thank you for introducing this! This is super helpful and I no longer have to write custom HTML CSS!!!

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Wahoo! So glad it was helpful!

  • @alexway101
    @alexway101 ปีที่แล้ว

    Cool tutorial. Thanks. Learning how to use CPT has been in plans for a long time. After this video now it's clear how to use it.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Really glad it helped! 🙌

  • @anarosiris
    @anarosiris 8 หลายเดือนก่อน

    Your explanation is super clear and very helpul. Thanks for share us

  • @benjamintracy1926
    @benjamintracy1926 ปีที่แล้ว +1

    I moderate a little community for a WP theme-building plugin designed for people working with custom fields and I'm always amazed that some people discover our plugin without understanding how custom post types, fields, and taxonomies work in the first place. This is going to become my go-to video to introduce the concept! Thanks for explaining this so simply but thoroughly :)

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Oh, wow! Thank you Benjamin! I am always surprised too - it's my favorite part of WordPress!

  • @merman1979
    @merman1979 3 หลายเดือนก่อน

    Another AHA moment, thanks to your teaching, Kyle! I'm not sure if ACF has had an update but I only needed that one plugin to get everything up and running.

  • @EdHallPhotoFL
    @EdHallPhotoFL ปีที่แล้ว

    Great tutorial and timely as my next project calls for custom post types and they hadn’t been clicking for me. Now I at least have this video to refer back to as I work with them in generate blocks and generate press.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Glad its helpful, Ed! Once it clicks, you're gonna love it!

  • @Xenio2007
    @Xenio2007 ปีที่แล้ว +4

    I hope you can make a similar tutorial with Pods.

    • @kylevandeusen
      @kylevandeusen ปีที่แล้ว

      Unfortunately I don't use pods, but it should be the same process.

  • @jeffbarnhart6441
    @jeffbarnhart6441 ปีที่แล้ว

    very interesting. thanks. I love learning about cpt/cf. please do more.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Glad you enjoyed! Thanks!

  • @agentbey
    @agentbey ปีที่แล้ว

    Kyle, this is super informative and good tutorial flow.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Thanks! Glad it was useful!

  • @fayemurry8323
    @fayemurry8323 ปีที่แล้ว

    Great video, Kyle. I really like the idea of adding taxonomies to be able to sort testimonials. I happen to be working on adding a CPT for testimonials and how I found your video today. Hope all is well with you!

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      So great to hear it helped, Faye!

  • @mhdoctor
    @mhdoctor ปีที่แล้ว

    I bought ACF in 2019 based on the "It's a no brainer." comments I saw. Tried to use it a few times but it never came together for me. I think your video will finally get me started.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Wahooo! There are soo many great use cases. I'd love to know how it goes for you and where you get stuck. Let me know and I'll try to un-stick you! :)

  • @markhemmingson7578
    @markhemmingson7578 ปีที่แล้ว +1

    Thanks for this video Kyle. Very clear and easy to follow. It really helped move along. I noticed you have a video embed. Do you have a minute to share how you displayed it?

  • @damiansaunders2074
    @damiansaunders2074 ปีที่แล้ว +1

    Great stuff, thank you, I think I'll start using CPT UI now, hand coding is tedious.

    • @kylevandeusen
      @kylevandeusen ปีที่แล้ว

      It's a great little free plugin!

  • @Mind6
    @Mind6 ปีที่แล้ว

    Great tutorial!!

  • @robinmoore3140
    @robinmoore3140 ปีที่แล้ว

    Amazing. Thanks for the fab tutorial. Great combo of plugins. I was looking at ACF Pro as an approach to a page builder. But, this grouping of plugins massively reduces the level of complexity. Easy-to-use backend for Editors and a flexible front-end layout builder for the less dev-savy user.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Yeah, I know a lot of people build out entire sites this way!

  • @NikitaIsLive
    @NikitaIsLive ปีที่แล้ว +1

    That's such a huge complint. I rember watcNice tutorialng Nice tutorials videos/channel with hundreds of thousands of subs when I was just starting out

  • @EricDegaardt
    @EricDegaardt ปีที่แล้ว

    Awesome man! Great content and well presented. Inspiring and very helpful. LGTW!! (let's get to work) lol

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Glad you enjoyed it, Eric! Thank you for the kind words!

  • @PawlSpring
    @PawlSpring ปีที่แล้ว

    Nicely explained. Perfect speed and level of detail. A question: Let's say a CPT is set up to have an image as you've demonstrated. What happens when there is no image? For example, 90% of CPT's have images but 10% do not. What happens?

  • @cuteek
    @cuteek ปีที่แล้ว

    Going to watch this 10 times

  • @andreadant
    @andreadant ปีที่แล้ว

    Hi Kyle, thanks for the video as always! Is there a specific motivation that you put off "editor" at 8:23? Isn't better to use editor instead a custom field like "wysiwyn" 11:07? Thanks

  • @Klaus53123
    @Klaus53123 ปีที่แล้ว

    Many thanks Kyle great work! I have sind questions if I may: for a customer I want to generate a post template. I have four different post categories but they should all use the same template. Can I use the standard WordPress categories in the custom post type or do I have to go down the route you described right at the end of the video? Many thanks Klaus

  • @steffox6362
    @steffox6362 9 หลายเดือนก่อน

    Thank you for this video! I rebuilt it and learned a lot!
    But one question remains: in minute 14:40 you talk about it being possible to select the 'post meta field' from the dropdown in the upcoming version of GB. I currently have version 1.8.2 installed, but the option of selecting from the dropdown does not exist there. Has this feature perhaps not been implemented after all? Or is there a setting you have to set first?

  • @caspercby
    @caspercby 7 หลายเดือนก่อน

    Hi! Great Video! Just wondering is there a way to create post / pages straight from ACF data and not creating a new post manually one by one? for exmaple if your acf data already have title fields and it uses the title text / string to create a new post page automatically? seems like this video is half dynamically since you have create a new post for all the date in ACF....

  • @OverflowGlobal
    @OverflowGlobal ปีที่แล้ว

    Great tutorial! We followed along to create an events section on our website. How can we make it so events that are past are removed from the query loop?

  • @masterbrubbel
    @masterbrubbel ปีที่แล้ว

    Hello Kyle, what would be your Suggestion: work with custom taxonomies or handle this past and future information with custom fields as part of the event cpt?

  • @JamesWelbes
    @JamesWelbes ปีที่แล้ว

    Interesting video. I agree it's very important to learn cpt/acf however I recommend staying away from the admin bar community on Facebook. Their admins are toxic and like to bully people for having a different opinion then ban you when you finally get fed up with the bullying.

  • @379rale
    @379rale ปีที่แล้ว +1

    Why did you install ACF, if you didn't use it?
    This seems really quick and easy. Was searching YT for a video like this a couple of days ago, one that shows how to do it with Generate tools.
    Thank you!

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      I did use it :) About 9min in, when I start adding custom fields... that was all with ACF. Glad you enjoyed!

    • @379rale
      @379rale ปีที่แล้ว

      @@TheAdminBar OK, I'm confused. Why are you using both?

    • @robinmoore3140
      @robinmoore3140 ปีที่แล้ว +1

      @@379rale They are two different things. Custom Post Types create the new post type (the 'event' post). ACF adds the fields to use in the new post type (the fields that populate the information on the event post).

  • @burkhardtmike
    @burkhardtmike ปีที่แล้ว

    Thanks Kyle! This blew my world wide open. I was stuck on one little issue with my query loops and this cleared it right up. Awesome. One question? I saw that Leo from GP made a content template for an archive card and applied that to a query loop. Is this possible with a custom post type archive?

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Yep, it currently works the exact same way. You would just change the display rules to show on the archive for the CPT. However, the new alpha version of GP there is a Query Loop element that makes all this a whole lot easier!

  • @69aantu
    @69aantu 11 หลายเดือนก่อน

    This is definitely helpful and I have a question, how to sort data by custom field like I have a custom field position and I want to sort data by position

  • @badcatdesign
    @badcatdesign ปีที่แล้ว +2

    great tutorial. How are you toggling Upcoming, Past, Future events with the button (and not switching to a different URL/page)?

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      It's with a custom-coded "tabs' type setup. There's a video in the GenerateBlocks FB group where the guy who made it shows how it's done (sorry, I don't have the link handy). I actually just took it off the site since there are no upcoming events at the moment 😅

    • @badcatdesign
      @badcatdesign ปีที่แล้ว

      @@TheAdminBar thanks, I'll look for it.

  • @JohannFritz78
    @JohannFritz78 3 หลายเดือนก่อน

    Great. How do you filter the list based on the button you clicked, All, Past or Future. It looks like the page stayed the same, so not different pages. Would love to know how that was implemented. Thank you!

  • @thisweblabvideos
    @thisweblabvideos ปีที่แล้ว

    Great one. What is your goto solution for searching data sitting in cusomt fields rather the the default content?

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      I believe Search WP does this - but I haven't done that in a while!

  • @MercadeoDigitalco
    @MercadeoDigitalco หลายเดือนก่อน

    What about using AirTable for feeding ACF ... is it possible? Thanks for your content!! so helpful!!

    • @TheAdminBar
      @TheAdminBar  หลายเดือนก่อน

      There are some services out there that will do it, but Airtable's databases are incredibly slow. I wouldn't recommend it.

  • @DiegoPereyra
    @DiegoPereyra ปีที่แล้ว

    Wow...!
    😳

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Custom fields are everything!

  • @skip1978
    @skip1978 ปีที่แล้ว

    Thanks for the step by step explanation. My ACF image fields are not pulled dynamically by the GB image block (dynamic data is set up correctly). What might be the problem? Text fields are fine. thanks

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      There's a setting in there for something like "Image ID" or "Image Array" (something like that - doing this from memory). Try swapping to whichever one of those its NOT currently on and I bet it works.

    • @skip1978
      @skip1978 ปีที่แล้ว

      @@TheAdminBar yes, Image ID was correct, problem solved, thanks

    • @robinmoore3140
      @robinmoore3140 ปีที่แล้ว

      @@TheAdminBar ah-ha! - I had this problem too. 🙂 ... fixed now.

  • @cikakurenosferatu
    @cikakurenosferatu ปีที่แล้ว +1

    Great tutorial.
    Is there any special setting for "description" (Wysiwyg Editor), because all my text is formatted in one line, without spaces, new lines, etc. - simply the text is not formatted as in the editor when I took the Headline element and set it to a paragraph for dynamic data. Thanks

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      You're right! There is a slight issue with this, but this little snippet of PHP takes care of the problem: generatetweaks.ogal.dev/add-wpautop/
      Let me know if it doesn't work!

    • @cikakurenosferatu
      @cikakurenosferatu ปีที่แล้ว

      @@TheAdminBar Yes, it works. Thanks ... God bless you 😀

  • @damiansaunders2074
    @damiansaunders2074 ปีที่แล้ว

    Is the toggle for events (taxonomies) on your site done with javascript? Or is that a block?

  • @ProvidersWebMadridProviders
    @ProvidersWebMadridProviders ปีที่แล้ว

    How did you make that filter: 26:03 ? Thanks

  • @Nima-Norouzi
    @Nima-Norouzi ปีที่แล้ว

    Thanks for this great tutorial. I know the concept of using custom fields...etc. But, sometimes for having not a complex layout, then we actually don't need to use custom post types. Why not use the normal post? In your example, you have a featured image, title, description... all normal information. Even if you have specific information about an event you can put it inside the post description. Unless, if you want to style it completely separate.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Yeah, the example I build out here is VERY basic just to show the concepts. But the example I show at the beginning on The Admin Bar's website, that's a more practical use case. Lots of different fields, a completely different layout than blog posts.
      Plus it makes it easier to query specific types of information.
      On The Admin Bar's website we have:
      - Posts
      - Endorsements
      - Podcasts
      - Events
      All of these need to be queried individually, have different data (and different types of data) and completely different layouts.

  • @nogool111
    @nogool111 10 หลายเดือนก่อน

    Thank you for the video. The dynamic data work for every field except repeater field. I searched the internet and haven't found any information about using generate block with repeater field. Can you make a video about this please?

    • @TheAdminBar
      @TheAdminBar  10 หลายเดือนก่อน +1

      GB does not support the repeater field.

    • @nogool111
      @nogool111 10 หลายเดือนก่อน

      @@TheAdminBar thank you...

  • @agentbey
    @agentbey ปีที่แล้ว +1

    Hi Kyle! Have you been using the latest version of ACF? The UI/UX is much better.
    I did run into one issue with GP Pro and the latest version of ACF. Fields assigned with Text Area and WYSIWIG aren't showing the line or paragraph breaks.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      Hey man! Yes, the new ACF is great 🙌
      I know exactly the issue you're dealing with on the WYSIWYG field - I had to have Tom look at this for me.
      It has to do with autop.
      I have a snippet that will fix it: generatetweaks.ogal.dev/generateblocks-wysiwyg-paragraphs/

    • @agentbey
      @agentbey ปีที่แล้ว

      @@TheAdminBar Super awesome, Kyle!

  • @eran2510
    @eran2510 ปีที่แล้ว

    Is it possible to use the text area and when inserting the heading it will be a generateblock headline?

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Yep, that's no problem.

    • @eran2510
      @eran2510 ปีที่แล้ว

      @@TheAdminBar how can I do that? every time I use H2 in the text area its regular H2.

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq 10 หลายเดือนก่อน

    is meta box better than ACF?

  • @tony.keller
    @tony.keller ปีที่แล้ว

    You need to enable REST API for your CPT (find that checkbox when create CPT at the bottom) and the meta fields labels will auto-populate in the list !
    Now my big wish is to make repeaters work.
    IDK how Tom is planning for that to happen ? If anyone knows drop me a line please.

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      Oh wow, I didn't realize that! 🙌 Thank you!
      I haven't talked to Tom about repeaters - but that would be ggreeeaattt.

  • @StrategyInformer-sjgold
    @StrategyInformer-sjgold 10 หลายเดือนก่อน

    Hi, what I need to do is have my custom posts act like standard posts, so like say I have the query set to give me the most recent 10 posts it would show both standard Wordpress posts AND the custom posts. How do I do that?

    • @TheAdminBar
      @TheAdminBar  10 หลายเดือนก่อน +1

      There's not a way to do that with the GB query block, but you could write a custom query to query multiple post types.

    • @StrategyInformer-sjgold
      @StrategyInformer-sjgold 10 หลายเดือนก่อน

      @@TheAdminBar I do have a PHP snippet that appends the custom posts into the loop and it works 100% on a static page showing the blog posts, but when I try to add that to GB in one of the query blocks it does not work at all.

  • @adrianw604
    @adrianw604 ปีที่แล้ว

    Thanks, useful video, but for some reason, the image didn't show up for me, despite following the instructions. Any ideas?

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว +1

      In ACF make sure you have the "Return Format" set to Image ID (I think by default it's "Image Array").

    • @adrianw604
      @adrianw604 ปีที่แล้ว

      @@TheAdminBar That worked - THANK-YOU!

  • @jarutosurano
    @jarutosurano 5 หลายเดือนก่อน

    how did you do the .w15 shortcut?

    • @TheAdminBar
      @TheAdminBar  4 หลายเดือนก่อน

      TextExpander

  • @frizkyzendy7113
    @frizkyzendy7113 ปีที่แล้ว +1

    Can I do it with metabox custom field?

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      That's a good question... I would ASSUME that you can, but I've never used Metabox so I'm not entirely sure!

  • @carolinaurrutia485
    @carolinaurrutia485 หลายเดือนก่อน

    Hello, your content about Generateblocks and ACF has been helpful to me but I have a problem. Custom fields that are not text, such as select or files type custom fields (attach a file), are not recognized by Generateblocks. How can I show those custom fields in WordPress blocks? My version of Generateblocks and ACF is the free version. Thank you and you have a new subscriber.

    • @TheAdminBar
      @TheAdminBar  หลายเดือนก่อน

      GB's integration with ACF is pretty limited.

  • @pahtashow
    @pahtashow 2 หลายเดือนก่อน

    Why just not use an event plugin free or premium ?

  • @GamingWithMitOfficial
    @GamingWithMitOfficial 8 หลายเดือนก่อน +1

    make a video on same topic but 2023 this video is 1 year old and wordpress and plugin is also updated

  • @vaniarensi7627
    @vaniarensi7627 ปีที่แล้ว

    Oh! what's that .wi5???

    • @TheAdminBar
      @TheAdminBar  ปีที่แล้ว

      It's just the keyboard shortcut I have set up with my Text Expander to paste in 5 paragraphs of Website Ipsum (like Lorem Ipsum, but one I made 😂). I use Text Expander for this and all kinds of things :)

    • @vaniarensi7627
      @vaniarensi7627 ปีที่แล้ว

      @@TheAdminBar Oh that's clever! I'll copy your method 👍🏻(I have aText)

  • @walterbunk2157
    @walterbunk2157 ปีที่แล้ว

    Pᵣₒmₒˢᵐ