Using Advanced Custom Fields And Custom Post Types Together The Right Way

Sdílet
Vložit
  • čas přidán 9. 09. 2024
  • In this tutorial, we go over how to use Advanced Custom Fields and Custom Post Types together to make your WordPress data more manageable. Keeping data only per-page basis can lead down a dark path of data that is difficult to update on a large scale.
    Sign up for the newsletter to notified about the free 2020 WordPress Development Course: wpcasts.tv
    Get WordPress Hosting:
    wpcasts.tv/go/k...
    *Don't forget to subscribe!*
    *SOCIAL*
    Twitter: / alexanderbyoung
    Instagram: / _wpcasts_tv_
    #AdvancedCustomFields #CustomPostTypes #WordPress

Komentáře • 46

  • @WPCasts
    @WPCasts  Před 5 lety +6

    I hope you learned something!
    Don't forget to subscribe: czcams.com/channels/8eV_x9GaQhcoL4rexOJpXg.html

  • @boxingtone
    @boxingtone Před 5 lety +5

    Awesome!
    You do the absolute best ACF tutorials.

    • @WPCasts
      @WPCasts  Před 5 lety +1

      Thank you! I appreciate that :)

  • @Uhohd
    @Uhohd Před 3 lety

    Cheers for these tuts on WP, ACF and CPTs :)

  • @joelnacionales3677
    @joelnacionales3677 Před 3 lety

    Always know what i need thank you men keep it up

  • @RichardLaya.
    @RichardLaya. Před 3 lety

    Thanks! very helpful, nice video.

  • @pawelkieryk
    @pawelkieryk Před 3 lety +1

    Awesome content, keep going man! :)

  • @joshuamayo3546
    @joshuamayo3546 Před 3 lety +1

    You have no idea how much this has helped me. I CANNOT thank you enough! Also, where can I find the Toastosterone?? :D

  • @ahmedmusawir
    @ahmedmusawir Před 5 lety +6

    Simply AWESOME!! (the volume is too low though ... :-)

    • @WPCasts
      @WPCasts  Před 5 lety

      Thanks for the feedback, i'll keep an eye on the audio levels :)

  • @federico.carucci
    @federico.carucci Před 4 lety

    Good job! A very nice trick with ACF and Gutenberg. Thanks!

  • @nicolaskeith8945
    @nicolaskeith8945 Před 2 lety +1

    Is this still the way to go about managing this type of data, Alex? Asking, because the video is 2 years old now. Thanks!

  • @stevenlee8256
    @stevenlee8256 Před 4 lety +2

    Nice video. Can you give me a direction .
    I have a woocommerce store sell different kind of electrical devices , now I registered a CPT called parts, I want to output a camera parts list (normal have 5-10 parts ) in my single product called camera (the parts list are almost similar fields in your CPT toaster, have basic fields of image thumbnail, price , dimension , weight , etc.) Now my question is can I use a ACF post object to product , or Is it possible to add a ACF relationship field to the product , and select the toaster then output it in a similar way as you showing use a post object?

  • @davidbrabyn1
    @davidbrabyn1 Před 4 lety +3

    Any tips on editing the toaster specs with this ACF+CPT setup but without having to open each toaster page in the admin, i.e. in the Toaster CPT list page (the one with the Quick Edit functionality - not sure of proper name). Thx

    • @tomd8019
      @tomd8019 Před 3 lety

      I use WP All Export/WP All Import for this.

  • @nicolaskeith8872
    @nicolaskeith8872 Před 4 lety +2

    But now you have the URL going to site.com/toasters/ -- what if you don't want that? What if you're only using CPT to organize data in the way you're describing?
    Please reply, if you have a second. Thank you.

    • @asht2058
      @asht2058 Před 4 lety

      I want to know the same

    • @nicolaskeith8872
      @nicolaskeith8872 Před 4 lety +2

      @@asht2058 Ash, you can specify the CPT as "not public" when setting it up.

    • @asht2058
      @asht2058 Před 4 lety

      Thanks,​@@nicolaskeith8872

  • @gstcy7925
    @gstcy7925 Před 4 lety

    Thanks!

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq Před rokem

    I want to create one custom field for my posts so that I can use this in dynamic content, in this case shall I use Advanced Custom Fields or Custom Post Types?

  • @sanaansari3935
    @sanaansari3935 Před 3 lety

    How do we display the post object that we selected on frontend using elememtor pro?
    Acf field key is not showing for post objects

  • @obie_silva
    @obie_silva Před 2 lety

    Hello, I want to do the same thing but display the ACF fields from a CPT to a regular template page. Can I do this?

  • @afflictionmarketing5303

    Can you please make a tutorial on how to add relational custom field without any plugin??

  • @kchoi2323
    @kchoi2323 Před 3 lety

    This video is great but the craziest thing I learned from this was at 7:30 when he somehow selected and edited 7 of the same functions by doing some weird select feature on his computer. How did you do it?!

  • @johnmbaye
    @johnmbaye Před 4 lety

    Maybe it's now better to use ACF Etended rather than CPT UI. It create also CTP, Taxonomy, but adding also many options wish are also linked to acf. For ex Json save.

    • @nicolaskeith8945
      @nicolaskeith8945 Před 2 lety

      It's all the same. You can use Pods as well, which comes even more fleshed out.

  • @rspaulding
    @rspaulding Před rokem

    Are there ways of doing this without having to edit the php file?

  • @DogTog
    @DogTog Před 5 lety +1

    Is this part 2 of another post, or perhaps the wrong video was uploaded?? It starts with some sort of plug in for toasters already installed, you can even see "Toasters" already in the left panel menu. Then it shows content for toasters already entered in a post, with a special format without explaining where that came from. Very confusing. Obviously starts in the middle of something.

    • @WPCasts
      @WPCasts  Před 5 lety

      The tutorial assumes you’re familiar with Custom Post Types and Advanced Custom Fields. The “Toasters” in the left panel menu is a Custom Post Type and the post with the special format is made by Advanced Custom Fields.

    • @DogTog
      @DogTog Před 5 lety

      @@WPCasts Ok, so you're using some special plug-ins or theme? That might be a good thing to mention in the video description.... but it still seems like this a part 2 and there is a part 1 that describes what the setup is here. Custom Fields is available on the add/edit screen of posts and pages, but it doesn't put things on the left admin panel, unless there is a way to do that which hasn't been mentioned yet.

    • @DogTog
      @DogTog Před 5 lety

      @@WPCasts Ok, so I added Advanced Custom Fields and added a Custom post Type, and it did not appear in the left column as seen in your video. So your setup is something different from a normal install.

    • @WPCasts
      @WPCasts  Před 5 lety

      Email me and we'll get it figured out for you. You can find my email here: czcams.com/channels/8eV_x9GaQhcoL4rexOJpXg.htmlabout

  • @jeanparacelse
    @jeanparacelse Před 4 lety

    Why did you keep the same HTML that you had for "toaster_specs" in the code? You duplicated the same HTML in toaster_specs_automatic but still keep the old one in the code. I don't understand why.

  • @billwoods4935
    @billwoods4935 Před 4 lety

    Hey, first, thank you for your great tutorials, I really appreciate it. I've been struggling with rewrite api concept!!!! I haven't been able to find a decent tutorial on that subject till a couple of days ago that I stumbled upon a youtube video called "Rewrite API: Setting Custom Permalink Structures for Custom Post Types". It is one of the best tutorials/talks on rewrite api for CPT, but the individual doing the presentation is going through a lot of materials too fast! I wish there were more detailed tutorial on that subject on youtube.
    I am wondering if it's possible for you to make a tutorial on that subject going a little bit more in depth?
    Thanks, I appreciate it!

    • @WPCasts
      @WPCasts  Před 4 lety

      I'll put that subject on my list of topics to cover :)

    • @billwoods4935
      @billwoods4935 Před 4 lety

      ​@@WPCasts Thank you sir. I appreciate it.

  • @TechTalkReview
    @TechTalkReview Před 4 lety +3

    It would be much appreciated if you could teach this kind of thing using Elementor Pro for non-coders or end users. I know Elementor has a lot of constraints. But at least can you show all related example codes for me to follow through this? Can I easily implement the code in templates using Elementor Pro? Thanks!

  • @kchoi2323
    @kchoi2323 Před 2 lety

    As I'm going through this exercise, I noticed that one con to this method is that you'll be creating an individual page for each toaster (or whatever post you're making). Is there a way to use a new post type as only a place to store the data without creating an accessible URL for it?

    • @vecseiszilveszter4672
      @vecseiszilveszter4672 Před 2 lety

      you can change that when you create the post type, you have arguments to disable creating pages with url. In WP everything is a post type, but not every post type is a page/post with url. Sam goes for CPT.

    • @nicolaskeith8945
      @nicolaskeith8945 Před 2 lety

      Yeah, when you're setting up the CPT, there's an option not to create a linkable URL for it, but only have it act as the product type you want to display in posts.

  • @jlambert12013
    @jlambert12013 Před 3 lety

    I would have liked this video so much more if it was “Shirts” or “Car”