Skip to main content

Unanswered Questions

1,110 questions with no upvoted or accepted answers
1 vote
0 answers
622 views

New menu is not showing in api response

I just make a custom Menu because I wanted to add a link in my menu but for some reason the new menus are not showing in the API response. any idea why and how should I fix this? I add a new menu ...
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
1 answer
1k views

Prevent Wordpress from sending set-cookie http header

For some reason Wordpress is setting "Set-Cookie" in the header of the entire site, this is telling my cache server not to cache the page, I tried to remove it via .htaccess, but it disabled ...
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
1 answer
1k views

How do I redirect the browser to 404 page, if no posts are found in home page

I am listing posts on the homepage with pagination and if no posts are found on the home page. I want to redirect the page to 404 page and get 404 response code. For example, example.com/page/200 Page ...
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
106 views

Responsive header image

I am new here. I have been looking into solving a problem I have been having for a while. I have setup my header image to be different for mobile and desktop. So far so good. However for screens with ...
1 vote
1 answer
490 views

How to add ID attribute to each submenu?

I would like to add an ID attribute to each list <ul> submenu. I am using the Walker class extension. I have managed to modify some elements, but I am left to solve this one problem. I need the ...
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....

15 30 50 per page
1
3 4
5
6 7
74