Skip to main content

Unanswered Questions

446 questions with no answers
1 vote
0 answers
38 views

How to approach this menu design?

I was given this design, and I'm struggling to find a way to implement something like this. The 6 items on the top bar dropdown on hover, then each has a submenu in the orange box to the left. ...
1 vote
0 answers
34 views

Trying to Create Menu in Wordpress

I have been trying to create a mega menu on the WordPress website. The problem that I am facing is not able to create a mega drop-down for different services. What I want to create is: When should I ...
1 vote
0 answers
52 views

Adding an Avatar to the Top Nav Bar

I am attempting to add an avatar image to the top nav menu. I am currently using this function, which takes a custom link and replaces it with the currently logged in user's name. That part of the ...
1 vote
0 answers
114 views

WP Menu Walker - How to know total depth from inside the start_lvl() method

The start_lvl() method allows to know the current $depth parameter. But, I need to output different results at level 1 if the menu has x or y total levels. I did a print_r() of the $args array, but ...
1 vote
0 answers
34 views

Filtering Only a Specific Menu using the “add_additional_class_in_li”?

Thanks to some help on here, I've managed to add bootstrap classes in main navigation li tag by adding this to my theme's functions.php // adding css to li tags for menu styling function ...
1 vote
0 answers
199 views

How do I add recent posts to the menu?

How to add recents posts to the menu? Entries with pictures. "Menu-item-object-custom" items in a div container? What I have now is: header.php wp_nav_menu( array( '...
1 vote
0 answers
841 views

Displaying primary nav menu two ways

Trying to modify the Twenty Twenty-One main menu. Given a main nav menu such as: Name of organization (links to home page) About Etc... For default behavior (on most pages other than home page), we ...
1 vote
0 answers
32 views

Easiest way to add dropdown to a page

I am trying to add a dropdown menu to my page (not menu or widget section) and once the user selects an item from that menu, it redirects to a specific page. I have tried using the block editor, but ...
1 vote
0 answers
54 views

Wordpress warning: "private_to_published" Deprecated when creating nav with wp_update_nav_menu_item()

For reasons specific to how my local development environment generates Wordpress menu items, I am trying to programmatically create a menu using wp_create_nav_menu() and wp_update_nav_menu_item(). My ...
1 vote
0 answers
103 views

Add css class to dropdown

This is a dropdown with two items. I want to visually give these two items a css style. Is this possible? This is the code I used: (function($) { "use strict"; tinymce....
1 vote
0 answers
282 views

Automatically adding new post categories to menu

Disclaimer: I am not 100% fluent in php. If I am doing something wrong in asking this here, please let me know. Many thanks! A site that I am working on is set up with several custom post types: City, ...
1 vote
0 answers
113 views

Change search results order for Admin -> Appearance -> Menus -> Pages -> View all

I have over 200+ pages (about 100 for each of my two languages). How I can change the order of results? I need the same as on the page with Page list. On the Page list e.g. you have a parent page and ...
1 vote
0 answers
25 views

nav_menu not displaying custom menu

Default menus will appear on all pages with no issues. However, when I configure a custom menu, it is displayed on all pages, other than the home page//main blog page. The menu disappears, the tags ...
1 vote
0 answers
415 views

Add data attribute to each li in menu

I have a menu listing all of my products categories in Woocommerce. I need to add an attribute data-relation to each <li> tag and the value for each one would be the ID of the category. I ...
1 vote
0 answers
484 views

How to create left and right menu with logo center in a custom theme?

I recently developed a new custom theme in wordpress. I want the following menu structure: Left menu LOGO Right menu For example: Home About LOGO HERE Blog Contact I created the following code: <...

15 30 50 per page
1 2
3
4 5
30