Free WP TP on "[Theme: Sparkling] add to each navigation item"

ساخت وبلاگ

I would like to add a <span> to each of the menu links in my primary menu. I am a coder so I just need to know what file and line to edit - can anybody help me add this?

I think that is a bootstrap based theme so you will have to find either in header.php where the bootstrap menu structure is defined or go into the theme's navwalker file and modify the menu items structure there.

The functions.php will tell you where the navwalker file lives.

I added this code to my navwalker file to add the ability to put the link's description element inside a span:

// add support for menu item descriptions if (strlen($item->description)>2) { $item_output .= '</a> <span class="sub">' . $item->description . '</span>';}

Do not edit the theme itself. First create a child theme for your changes.

@jaycbrf @esmi I hope you are well today and thanks for helping out here in this forum.

Your help here is really appreciated.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 202 تاريخ : يکشنبه 30 خرداد 1395 ساعت: 14:46