Articles of menus

How to display dynamic content in start_lvl function

I am creating a custom nav walker but having trouble outputting parent menu item title in start_lvl function. I want to output it right after the <div class=”dropdown”> in the following start_lvl function. function start_lvl(&$output, $depth = 0, $args = array()) { $indent = str_repeat(“\t”, $depth); if ($depth == 0) { $out_div = ‘ <div […]

When add wordpress page in menu it converted in to custom link

Firstly I tried to post this question on wordpress support with hope that they must know about this issue because its official forum of wordpress but I didn’t get any reply from them. So now I am here to find solution. Problem comes after update. When I add page in menu (Appearance -> menu) and […]

Programmatically create menu with custom link

I am creating pages and assign them to a menu with custom link. Pages are properly created and menu is properly created, too. However, custom links are not given to the menu items. What I want is to assign a custom link # (so that the link doesn’t work) to a menu item, but no […]

Jump links to another page and return back to the first page anchors successfully

I have made a one page website with their jump links using id attribute (#). These jump links are provided in the navigation bar (header navigation menu). Now, we want to add another page, but the problem is that when we are on this new page, the anchors (jump links) of the first page don’t […]

WordPress Split Menu

I’m coding my first WordPress Theme and trying to solve this problem: On the desktop version of the website I’d like to split the menu into 2 sections. One would appear on the left of the logo and the other on the right of my logo (the logo is centered). The only way I know […]

WordPress menu that shows all posts in a certain category like w3schools

I am working on creating a widget menu(kind of a sidebar like w3schools) that is supposed to show all posts that are listed in a particular category. And update automatically from particular category(Ex:- HTML).

Create self-populating menu and add extra divs to the menu layout

What I’m trying to achieve: A menu with one level of sub-menus: PAGE 1<br> — Page 1 sub-page 1<br> — Page 1 sub-page 2<br> PAGE 2<br> — Page 2 sub-page 1<br> — Page 2 sub-page 2<br> — Page 2 sub-page 3<br> PAGE 3<br> — Page 3 sub-page 1<br> — Page 3 sub-page 2<br> When on […]

Change where navigation bar links?

I have a client with a WordPress blog who wants to have her website run two separate websites in the same WordPress installation by duplicating pages and changing the place that the navigation bar links. I can easily duplicate the page, but when I do it just adds a copy of the same link. Is […]

Social Links Menu displays icon instead of text (twentyfifteen)

EDIT: I posted too hastily. I just discovered that the solution to my problem is to bypass the regular Menus section and create a custom WIDGET, which can serve as a custom menus box. Below is my original post. I’ll delete this post if you like. I’m working with the theme twentyfifteen, which allows you […]

Show woocommerce categories on my theme menu styling

I am modifying a Theme I purchased since it is not prepared for woocommerce. It has an option to select a megamenu from a dropdown list on the menu where it says not megamenu. This is the code I find related to this part of the menu on my theme code. $menu_control .= ‘<select style=”‘. […]