WordPress 101 - Part 20: How to create Custom Taxonomies - Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ธ.ค. 2024

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

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

    Speaking as someone who is more of a designer than a developer, thank you for making tutorials aimed at noobs who are trying to set things up the proper way on their site with code. Most of the time I click on a video and the solution is "go download this bloated plugin from a developer that might not even be around this time next year," but yours is one of the few channels I can reliably go to to figure out how to do something the right way.

    • @alecaddd
      @alecaddd  6 ปีที่แล้ว

      I'm really happy to hear that, thanks for your comment. Happy Coding!

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

    Alessandro .... such a nice approach. Absolutely this is is pro level tutorial i ever found.... keep going

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

    Wow, I've been watching all the videos from the first one and I have to say that this is amazing. It is so well explained. I'm going to finish the last two left.
    Thank you so much

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

      You're very welcome, I'm glad you're enjoying it so far :D

  • @stone-mind
    @stone-mind 3 ปีที่แล้ว

    Hi, Alessandro Castellani. It is surprising that, now 2021 and your tutorial is 2015 but still its super useful. Thank you for your great tutorial. I already decided to complete your all WordPress related video.

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

    Excellent video and the way you are using in this video to explain the taxonomies is simply superb

    • @alecaddd
      @alecaddd  8 ปีที่แล้ว

      Thanks you so much!

  • @mdsaifulalam8926
    @mdsaifulalam8926 7 ปีที่แล้ว

    You are really a great coding teacher. Awesome tutorial .Thanks Alessandro.

    • @alecaddd
      @alecaddd  7 ปีที่แล้ว

      Thanks for watching the series so far :D

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

    Alessandro, with your videos everything in WP is "supersimpol". ;)
    Thanks, man - my thumbs is yours! :)

    • @alecaddd
      @alecaddd  8 ปีที่แล้ว +3

      Now I have to decide what to do with those thumbs....mhhh....mhhh...

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

    many many thanks like always , you have a great efforts , you explain things in very good and simple form

  • @najmantube
    @najmantube 8 ปีที่แล้ว

    I really like your videos - they are so clear and simple - thanks!

  • @sadaksalaheddine7798
    @sadaksalaheddine7798 8 ปีที่แล้ว

    thank you a lot Alessandro , it was my first tutorial to learn how to create web site with wordpress ;, and im now started to build my web site with wordpress i gana send you the url after i finish , thanks a lot :D

  • @bevedel
    @bevedel 4 ปีที่แล้ว

    Great tutorials, Thank You so much!

    • @alecaddd
      @alecaddd  4 ปีที่แล้ว

      You're very welcome!

  • @mariemghayeza1477
    @mariemghayeza1477 4 ปีที่แล้ว

    hello, thank you for the video! it's amazing. I have a question please?
    I have a taxonomy named "Names" and i want to put 10000 names in it, I have these names registred in a xls file, is it possible to integrate the xls file in the taxoomy and avoid to rewrite it all? i hope to get help. thank you

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

    This is very useful and clear thank you for your sharing

    • @alecaddd
      @alecaddd  8 ปีที่แล้ว

      +Pir Mecra Thank you so much!

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

    Great video. Really helpful.

    • @alecaddd
      @alecaddd  7 ปีที่แล้ว

      Thank you :D

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

    Hi Alex - followed this tutorial to the letter and all working fine. However, all 'standard' posts have now disappeared from the homepage (content on here was built from tutorials Part 9: Edit the query_posts with WP_Query and Part 10: Filter the WP_Query with categories). Do you have any idea of why this should be?

    • @najmantube
      @najmantube 8 ปีที่แล้ว

      The answer to my question is contained in Part 21 (don't use 'type')!

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

    You created the custom taxonomy "types". Is ot possible to hide/show custom post types based on the "type" we created?

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

      +Arete Absolutely. It's actually a built in functionality of WordPress.
      query_posts( array( 'post_type' => 'myportfoliotype',
      'tax_query' => array(
      array(
      'taxonomy' => 'types', //or tag or custom taxonomy
      'field' => 'id',
      'terms' => array('9', '13')
      )
      )
      ));
      With this code you can show your CPT only if they have a custom taxonomy id of 9 or 13.
      To exclude a specific taxonomy just add another attribute after terms:
      'operator' => 'NOT IN'
      Cheers,
      Alex

  • @banglaleaks9712
    @banglaleaks9712 7 ปีที่แล้ว

    hi, followed your every detail. I just put the code in a plugin's function. so I can activate or deactivate the custom post type and taxonomy. now the problem is I have my custom taxonomy but also the sub menu name category! how can I remove that sub menu.

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

    Thanks! And can you make video on how to create a breadcrumb navigation and custom comment. Thanks!

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

    That was brilliant, a little question though :
    In the admin, for the "Portfolio Post" menu i have new taxonomy "Types" ok, but i also still have the good old "Categories", which you dont have on your tutorial. Any way to make it go away ?!
    And also, forgive me in advance, maybe it's a little bit confusing to use "Types" as a new Taxonomy after a tutorial about custom post types !!
    You definitely deserve all those good reviews Alessandro...

    • @alecaddd
      @alecaddd  7 ปีที่แล้ว

      Hi, thank you so much for watching.
      About your question, in the array of arguments to register_post_type() there is a parameter "taxonomies". If category is not specified there, then it shouldn't appear with that post type.
      Good suggestion about the name "Types". I'm sorry if it resulted confusing, but English is not my first language and sometimes I struggle in finding the proper words.
      Happy Coding!

    • @holalabellebille
      @holalabellebille 7 ปีที่แล้ว

      Yeah ! Exactly, i'm happy because i found out myself while creating (again and again) a new totally blank theme and editing my custom post types (i added this experience in your next video)
      My God, your 101 video is so incredible...

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

    Hello Mr. Alessandro,
    Your video tutorial is descriptive and full of knowledge, these tutorials are helping me a lot to learn about WP.
    Good Work and keep it up.
    But, perhaps there is an video quality issue because i have downloaded 720p video even though video is not clear to me, may be my eyes are week, not sure :)
    Thanks Again.

    • @alecaddd
      @alecaddd  7 ปีที่แล้ว

      Hi, thanks for watching. My videos should be in 1080p, I know that if you try to download videos from TH-cam, sometimes the quality gets compressed and you get a lower resolution file

    • @vipinsaini3497
      @vipinsaini3497 7 ปีที่แล้ว

      Okay.
      Got it.
      Thanks for your answer :)

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

    thanks alot..your tutorial is really helpful i just want to know when your next video will come(after part-22)

    • @alecaddd
      @alecaddd  8 ปีที่แล้ว

      Thank you for watching.
      The WP101 series is complete. I started a new series about Premium Theme Development.
      Check that playlist, I'm currently at video #41, lots of good stuff and more advanced coding for WordPress :D

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

    Thanks man! very helpful

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

      +Shalika Ranathunga You're very welcome!

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

    thanks once again sir

  • @SumanGupta-dj9kh
    @SumanGupta-dj9kh 6 ปีที่แล้ว +1

    Great sir ...

  • @YasirMalik24
    @YasirMalik24 7 ปีที่แล้ว

    Hi, how can i use feature-image field for taxonomy?

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

      You need to add a custom field to the taxonomy. Check this tutorial: pippinsplugins.com/adding-custom-meta-fields-to-taxonomies/

  • @edcelestadola5386
    @edcelestadola5386 5 ปีที่แล้ว

    Thanks man. you saved me!

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

    Thanks once again..

  • @saurabhupadhyay8873
    @saurabhupadhyay8873 7 ปีที่แล้ว

    hi i need my custom post feature image in slider without using plugins

    • @alecaddd
      @alecaddd  7 ปีที่แล้ว

      Check the Premium Theme development series to learn everything you need

  • @babar-khan
    @babar-khan 4 ปีที่แล้ว

    Hey Alessandro. Thank you very much buddy

    • @babar-khan
      @babar-khan 4 ปีที่แล้ว

      @Alessandro

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

      Check my Premium WordPress theme series Playlist on my channel to learn everything you need.

  • @OlaG-el9zr
    @OlaG-el9zr 5 ปีที่แล้ว

    Thank u very much. God bless u

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

    Your awesome , thank you for this vid :)

    • @alecaddd
      @alecaddd  6 ปีที่แล้ว

      Thanks for watching :D

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

    Thank you

  • @yu5uy
    @yu5uy 3 ปีที่แล้ว

    you should add this to play list omg

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

    pls make tutorials for custom fields tooo great tutorial good day

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

      +son father I already did it, check the premium development series and you'll find a lot of good stuff

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

    your the boss

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

    great! thank you so much)

    • @alecaddd
      @alecaddd  8 ปีที่แล้ว

      +Light Up you're very welcome

  • @andrebalieiro2477
    @andrebalieiro2477 8 ปีที่แล้ว

    Muito bom!!

  • @lamaletadefelix8950
    @lamaletadefelix8950 6 ปีที่แล้ว

    Hi Alessandro i love your work, i'm really grateful for all your videos i just love them, i watch everything you post about WP.
    I'm trying with this code get all my childs in the taxonomy in one cpt, and work just fine for my taxos with a parent a child and a grand child, for example; Asia/Sudeste Asiático/Vietnam. but i need one more level of dependency for example;
    Asia/Sudeste Asiático/Vietnam/Bahía Ha-Long, means a grand grandchild, i don't know how i say this but, i hope you get it.
    Now the problem is: i´m able to get them but in not a hierarchical order for example: Asia/Bahía Ha-Long/Sudeste Asiático/Vietnam i need Asia/Sudeste Asiático/Vietnam/Bahía Ha-Long
    I hope any tip or suggets, my super best regards from a WP developer.
    ------------------------------
    function travelmate_get_terms($postID, $term){
    $termsList = wp_get_post_terms($postID, $term);
    $output = '';
    $i = 0;
    foreach($termsList as $term){
    $i++;
    if ($i > 1){ $output .= ', '; }
    $output .= ''. $term -> name . '';
    }
    return $output;
    }

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

      Hi Alessandro, i solve it with this, really simple.
      function travelmate_get_terms($postID, $term){
      $termsList = wp_get_post_terms($postID, $term, array(
      'orderby' => 'term_order', 'order' => 'ASC'
      )
      );
      $output = '';
      $i = 0;
      foreach($termsList as $term){
      $i++;
      if ($i > 1){ $output .= ', '; }
      $output .= ''. $term -> name . '';
      }
      return $output;
      }

  • @Амьдрахсайхан-з8б
    @Амьдрахсайхан-з8б 5 ปีที่แล้ว

    can you help me, please?

    • @alecaddd
      @alecaddd  5 ปีที่แล้ว

      What's up? Check my source code on GitHub if you have issues

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

    I dont understand why WordPress doesn't implement some extremely easy to use, helpful and common sense features. For example, you cannot categorize/group pages in the sense of a CATEGORY. Yes you can use tags but its not the same. When I wanted to do so back then I had to use custom Taxonomies to achieve what i wanted. I didn't want to use a ready made plugin so i did it myself. There are certain things in WP like this one, that make your life harder for no reason. Its such a great system yet missing some very basic functionality. YES you can do whatever you want if you know how to code but out of the box it has pretty limited features and customers dont seem to understand this. They want WordPress to do everything without any 3rd party plugins or custom code. Nop, not happening.

    • @alecaddd
      @alecaddd  8 ปีที่แล้ว

      +HackerCY Yeah, I agree that sometimes WP feels limited out of the box, but I feel like things are slowly changing.
      With the introduction of the customizer and the implementation of more and more options, before limited tot he use of plugins, the system is evolving to be more visual and more complete and more independent.
      Do you remember 6 years ago how a nightmare was to manage the Nav menu without a plugin?
      Now the Menu action is fully visual with Drag&Drop options to manage multiple navs.
      I see WP evolving and becoming more complete and easy to use, but that takes time and sometimes you find yourself working with sections that look like abandoned since version 3.
      Thanks for sharing your opinion.

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

      +Alessandro Castellani i agree with you! Keep up the good work by the way :) I've been following you since the beginning and im glad to see your channel grow.

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

      +HackerCY Yeah, I remember your nickname, you were part of my first 100 subscribers. Thank you so much for keep following, it has been quite and adventure :D