#35 Custom Meta Box WordPress | Meta box WordPress tutorial | add_meta_box

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

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

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

    If you don't see your meta box in the editor, try in your classes folder -> class-{ your_theme_name }-theme.php :
    protected function __construct() {
    // load class
    Assets::get_istance();
    Menus::get_istance();
    Meta_Boxes::get_istance(); // add this to show meta box!
    $this -> setup_hooks();
    }
    Thank you for this amazing tutorial!

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

      Welcome 🙏 thank u for putting this up.

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

    I watched the video two time and you didn't said that need to get the instance of Meta_boxes class. I thought that was me but no.

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

      Thank u for letting me know. That part must have been accidentally cropped during editing.
      It's good you have been following along previous videos so you could quickly figure out that whenever we create a class we need to get it's instance.

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

      Actually, I’m software engineer and one of my favorite subject was OOP. And I have to say that your tutorial is helping to back to that and understanding how to use in Wordpress theme development. Thank you again.

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

      Wow. That's great to know. OOP is my favourite too. I use it both in JavaScript and php. These are practical knowledge that I am sharing as to how things are implemented in real world.

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

      @@Codeytek You should at least note the situation to be thorough...especially in a learning situation. Most "students" like this individual...and myself...may think it was something we did. Thanks

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

      Thank for the suggestion . I have added the below note in the video description.
      Ensure to get the instance of the class into the class-aquila-theme.php by adding Meta_Boxes::get_instance(); ( which is not shown in the video ) You can check the code here
      github.com/imranhsayed/aquila/blob/b37b0d6e8bda62dc18884a04ba270c334f0c098a/inc/classes/class-aquila-theme.php#L20

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

    No nonces?

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

      Would you like to contribute by raising a PR for your suggestion?