Creating Custom Post Types With Advanced Custom Fields

Sdílet
Vložit
  • čas přidán 7. 04. 2023
  • You can now create Custom Post Types and taxonomies using ACF. In the video we create two Custom Post Types with a relationship field linking them, a custom taxonomy, and add custom fields. We then turn the relationship field into a bidirectional relationship.
    Advanced Custom Fields - wordpress.org/plugins/advance...
    Bidirectional code docs and snippet: www.advancedcustomfields.com/...
    Text version of the video on the WebTNG website - www.webtng.com/creating-custo...
  • Jak na to + styl

Komentáře • 42

  • @sidikvideos
    @sidikvideos Před rokem +6

    Great tutorial! I like also the very relaxing tone of your voice.

  • @fabiano8888
    @fabiano8888 Před rokem +1

    Hello, David! Thank you for the excellent content that you provide on your channel. I really appreciate your work, and I am looking forward to seeing more videos on ACF. I have noticed that most of the videos on CZcams are tailored to Elementor, which doesn't interest me.

  • @TheKinderCookiePress
    @TheKinderCookiePress Před 2 měsíci +1

    This is helpful! Thank you for the detailed walkthrough.

  • @ekcelhenrichekoumelong4457

    Thank you for your work. That was incredible!!

  • @AthloneH
    @AthloneH Před rokem +5

    Thank you for the video David, always helpful. How about a Metabox vs ACF showdown now that they both have CPT abilities? 😉

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq Před 11 měsíci +1

    Very helpful, it's so detailed

  • @andreadant
    @andreadant Před rokem +1

    Really interesting and useful! Thanks

  • @lazlo342
    @lazlo342 Před 9 měsíci +2

    Thanks so much. Excellent tutorial. Clear and concise. I just spent an hour watching a different tutorial that was trying to explain the same features but the author was not a native English speaker and it was pretty much impossible to follow his broken English when he would omit important key words.

  • @california_ray
    @california_ray Před rokem +2

    I love your videos. period.

  • @whitneylee33
    @whitneylee33 Před 3 měsíci

    Very helpful, thank you!

  • @HSRehman
    @HSRehman Před rokem

    A quality content, thank you

  • @nicolaskeith8945
    @nicolaskeith8945 Před 5 měsíci +2

    Hey Dave, great video. Question: wouldn't book authors be a taxonomy?

  • @AvaneeshKumarSingh
    @AvaneeshKumarSingh Před rokem +2

    Hi David, Can we have an ACF vs ACPT comparison video with all new features of both the tools?

  • @stevebaker2896
    @stevebaker2896 Před rokem +1

    Great video David - what did you use to generate the Lorem Ipsum in the dropdown please? Looks like it came from your menu bar?

    • @DavidMcCan
      @DavidMcCan  Před rokem +1

      A browser extension called "Lorem Ipsum Generator". There are several of them in the extension store. I guess these days I should be using AI to create something more real like. 😀

  • @ericgauvin7681
    @ericgauvin7681 Před rokem +1

    Thanks for this info. Very useful. I'm planning on using Formidable Forms to do frontend CRUD for s business directory. It can save entries as CPT, which I am planning to create somehow--ACF looks great. Formidable also has views for displaying on the front end. I want to use a CPT because I'm planning to use FacetWP for filtering on the front end, which requires a CPT. I want the listing owners to be able to categorize etc for searching on the front end. Any advice on this would be appreciated? I'm getting a little confused figure out how it will all fit together, but I don't think it should be super complex.😃

    • @DavidMcCan
      @DavidMcCan  Před rokem

      Using Custom Post Types makes sense. The easiest way to make facets is using Categories and tags. Those are usually the default sources for the filters. You can use custom fields for the filters, but that is more advanced. Hope that helps.

  • @cholo2605
    @cholo2605 Před 17 dny

    Thanks!!!

  • @andreadant
    @andreadant Před rokem

    David, thank you for the tutorial, could you tell me specifically what that "Hierarchical" function is for at 10:00? Im a beginner and noticed that without this option my cpt archive template give me a 404 error. While if I activate this function it's ok. Thank you

    • @DavidMcCan
      @DavidMcCan  Před rokem +1

      When it is hierarchical it is like categories and when it is not it is like tags. Perhaps you have an archive for categories and not tags or when you created the archive you added a field to output for one and not the other?

  • @captusn7838
    @captusn7838 Před měsícem

    Would like to understand how to use a number field or Text field for Addresses which are numberic and text. ACF said I could use only one. What's up?

  • @user-en8ld5td1b
    @user-en8ld5td1b Před rokem

    Hi David! Thanks for the video, you just saved my work haha! I want to ask you if there's a way for listing in the autor's page the books just by that author, and when i click on another author, the same, see only the books of that author. Thanks again for the video!

    • @DavidMcCan
      @DavidMcCan  Před rokem

      Yes, it is called the author archive. When you create your front-end templates you'd create one called author.php, or it will use the archive.php if that doesn't exist. If you are using a page builder then check its archive options. If you are creating a custom one then you can use the posts block or the query loop or whatever of that type of block and instead of category you filter by author. In the post meta you make the author's name a link.

  • @ahmedshalaby8832
    @ahmedshalaby8832 Před 18 dny

    Thanks :)

  • @MarkoKozlica
    @MarkoKozlica Před 4 měsíci

    Hello! Thank you for your tutorial. I have noticed that select fields have the search option when creating a new post. I have tried to enable it using the Stylized UI option but it still does not show up when creating new custom post. Help? :D thx

  • @dannykirk2917
    @dannykirk2917 Před 6 měsíci

    Hi love the video very well put together. One question I have is how do you remove the post type key from the url slug. I could do this very easily in CPTUI?
    Thanks
    Danny

    • @dannykirk2917
      @dannykirk2917 Před 6 měsíci +1

      I have managed to sort it thanks Danny

  • @mikethefunkmorales
    @mikethefunkmorales Před 3 měsíci

    Your tutorial is extraordinary, I only have a question: how would you make the permalink show the category to which the book belongs? Did you make a taxonomy called Generate?

    • @DavidMcCan
      @DavidMcCan  Před 3 měsíci

      There was a taxonomy called Genre. The show on the right side in the editor.

    • @mikethefunkmorales
      @mikethefunkmorales Před 3 měsíci

      @@DavidMcCan Thanks for responding but what I mean is that in the natural section of WP which is POST, and when you select that category under the Title your route appears including the taxonomy of the selected category.
      In the case of CPT, by nature, that permalink does not appear under the title and when you select your Gender category, the url does not contain said category and that is exactly what I need to know if it is possible for the CPT from the plugin to do that.
      I solved that using a permalink code from the wordpress core. But the ideal is for the ACF Pro to do it.

    • @DavidMcCan
      @DavidMcCan  Před 3 měsíci

      @@mikethefunkmorales - So for the permalink. I haven't tried it, but the docs mention that you can specify a custom slug. On this page under PERMALINK REWRITE: www.advancedcustomfields.com/resources/registering-a-custom-post-type/

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq Před 11 měsíci

    hi, I want to create one custom field in my post to use it in Dynamic Content, shall I do this with Custom Post Type UI or Advanced Custom Fields?

    • @DavidMcCan
      @DavidMcCan  Před 11 měsíci +1

      Advanced Custom Fields. You don't need CPT-UI any more.

  • @Outlanderwow
    @Outlanderwow Před rokem

    Lat update lost me... So many changes I cant catch up :/

    • @DavidMcCan
      @DavidMcCan  Před rokem

      Sorry to hear that. There have been a lot of changes. Many, but not all, can be ignored -- you can keep using CPT-UI, for instance, if you want to.

  • @HaifengZhu-pn3uq
    @HaifengZhu-pn3uq Před 9 měsíci

    hi, I have already created custom post type, how can I add categories to the custom post type

    • @DavidMcCan
      @DavidMcCan  Před 9 měsíci

      If you created the Custom Post Type using ACF, then you can use it to create the custom taxonomy also. The video show that.

    • @HaifengZhu-pn3uq
      @HaifengZhu-pn3uq Před 8 měsíci

      @@DavidMcCan hi, I have created one taxonomy, how can I add sub-taxonomy under this taxonomy?

    • @DavidMcCan
      @DavidMcCan  Před 8 měsíci

      Set it as being hierarchal.