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

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 74

  • @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!

  • @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.

  • @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

  • @mbkaushik
    @mbkaushik 7 лет назад +1

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

    • @alecaddd
      @alecaddd  7 лет назад

      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

  • @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

  • @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!

  • @pirmecra2873
    @pirmecra2873 8 лет назад +1

    This is very useful and clear thank you for your sharing

    • @alecaddd
      @alecaddd  8 лет назад

      +Pir Mecra Thank you so much!

  • @bevedel
    @bevedel 4 года назад

    Great tutorials, Thank You so much!

    • @alecaddd
      @alecaddd  4 года назад

      You're very welcome!

  • @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')!

  • @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!

  • @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

  • @noelopez3
    @noelopez3 7 лет назад +1

    Great video. Really helpful.

  • @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

  • @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

  • @OlaG-el9zr
    @OlaG-el9zr 5 лет назад

    Thank u very much. God bless u

  • @yu5uy
    @yu5uy 3 года назад

    you should add this to play list omg

  • @edcelestadola5386
    @edcelestadola5386 5 лет назад

    Thanks man. you saved me!

  • @hundradpipers5112
    @hundradpipers5112 8 лет назад +1

    thanks once again sir

  • @zafershoaybi
    @zafershoaybi Год назад

    Thank you

  • @ShalikaRanathunga
    @ShalikaRanathunga 9 лет назад +4

    Thanks man! very helpful

    • @alecaddd
      @alecaddd  9 лет назад +1

      +Shalika Ranathunga You're very welcome!

  • @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 RUclips, sometimes the quality gets compressed and you get a lower resolution file

    • @vipinsaini3497
      @vipinsaini3497 7 лет назад

      Okay.
      Got it.
      Thanks for your answer :)

  • @SumanGupta-dj9kh
    @SumanGupta-dj9kh 6 лет назад +1

    Great sir ...

  • @VasilisKar
    @VasilisKar 8 лет назад +2

    Thanks once again..

  • @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.

  • @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

  • @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...

  • @danielmobbs9648
    @danielmobbs9648 6 лет назад +1

    Your awesome , thank you for this vid :)

    • @alecaddd
      @alecaddd  6 лет назад

      Thanks for watching :D

  • @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/

  • @hundradpipers5112
    @hundradpipers5112 8 лет назад +1

    your the boss

  • @sasha123456789ize
    @sasha123456789ize 7 лет назад +1

    great! thank you so much)

    • @alecaddd
      @alecaddd  7 лет назад

      +Light Up you're very welcome

  • @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

  • @andrebalieiro2477
    @andrebalieiro2477 8 лет назад

    Muito bom!!

  • @lamaletadefelix8950
    @lamaletadefelix8950 5 лет назад

    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 5 лет назад +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;
      }

  • @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

  • @Амьдрахсайхан-з8б
    @Амьдрахсайхан-з8б 5 лет назад

    can you help me, please?

    • @alecaddd
      @alecaddd  5 лет назад

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