wp_nav_menu example & Tutorial

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024
  • Blog Post: truthseekers.i...
    Source Code: github.com/tru...
    In this video we go over just about everything wp_nav_menu has to offer. There's complete working source code above. We'll talk about the items_wrap and how you can customize the Unordered List container (UL) and how you use the sprintf thingy that php provides.
    We'll show you two different ways of adding classes to your list items. the first way is with a custom property passed into wp_nav_menu. The second way is by using the Walker class.
    Finally, we'll show you how to use the four functions walker_nav_menu provides so you can completely customize your navigation.

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

  • @muhammadqurban102
    @muhammadqurban102 4 месяца назад +1

    I am new subscriber by just watching this video. You explained everything in a very good way. Thanks

  • @generica1
    @generica1 7 месяцев назад

    This tutorial was a lifesaver. Got it working without any hiccups.

  • @mlh7h
    @mlh7h 2 года назад

    Thanks for the reminder on manage locations. I was banging my head against the wall for way too long trying to figure out how the names of the locations worked.

  • @mohamedhassanin6054
    @mohamedhassanin6054 2 месяца назад

    Thank you

  • @ChristianMuggli
    @ChristianMuggli 9 месяцев назад

    you are a hero, 100%!

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

    that so increadeble, thaks for the class

  • @user-hq9dy5nb1g
    @user-hq9dy5nb1g 11 месяцев назад

    Good stuff man thanks!

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

    Thanks, great tut, was very helpfull! :)

  • @Beni352
    @Beni352 2 года назад

    Great tutorial , much needed

  • @outpost31737
    @outpost31737 2 месяца назад

    You don't need to add a custom function to style the li's. Why have you done it this way?

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

    Great tutorial, thank you! If possible could tell how to add elements inside another element? For exemple lets say that I'd like to add a inside the menu's to use icon on my menu, is that possivble? Or even add two like .

    • @generica1
      @generica1 7 месяцев назад

      The way I did it. I added the font awesome icon code to the title attribute of the menu item. Then in the nav walker: if ($item->attr_title) { $tmp_icon_classes = $item->attr_title; } - then I add that to this : ""

  • @zacharyarsenault4617
    @zacharyarsenault4617 Год назад +2

    fianally somone that explained everything

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

    Hello I have problem at 3:24 which I try to add same code line in function.php but somehow my at dashboard theme appearance section menu still didn't appear is there any solution for this one?

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

    I do not understand why my 3rd depth level in menu does not show on front.

  • @dashingpix
    @dashingpix 2 года назад

    Good One

  • @anirudhachakrabarty2050
    @anirudhachakrabarty2050 7 месяцев назад

    How to add active class on the selected item?

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

    15:49 second...can somebody explain what 1, 3 means as parameters?

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

      developer.wordpress.org/reference/functions/add_filter/ It appears they are the priority, and number of arguments the function accepts.