Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files.

learn more… | top users | synonyms (6)

0
votes
0answers
33 views

Custom nav menu current item custom link problem

Because I want to add <span class="dashicons [class]"></span> inside each link of my menu I needed to create a custom made nav menu. I did this by the code below which works great, but ...
0
votes
0answers
28 views

working with wordpress theme

I am trying to create a wordpress theme, actually I am very new to wrodpress theme and plugin and currently learning wordpress theme, so I have a html design with me and I am trying to convert it to ...
0
votes
1answer
38 views

is_page() not working with archives?

I am creating a dynamic menu and in my foreach loop I am running a is_page using the page title: <li class="<?= (is_page($tlp->post_title) ? 'active' : '');?>"> </li> This ...
0
votes
1answer
99 views

Adding archive years to my menu

I'm Wordpress newbie and despite of reading many articles, I'm able to put archive years to my main menu. Menu contains pages and I need to add an archive. My current menu: - Home (page) - About (...
1
vote
1answer
130 views

Replace menu permalink/hyperlink with only menu name/slug

I don't know if i am asking this correctly, but i will try. I am doing this for history pushstate purpose. Code to get menu wihout ul and li: $topmenu= array( 'container' => false, '...
0
votes
1answer
32 views

Menu not appearing in custom theme

I made a custom theme, but the menu is not showing in appearance section. I created a separate function file named function.php and the code is: add_theme_support( 'menus' ); function ...
0
votes
1answer
35 views

wp_nav_menu doesn't work in a duplicate server

I duplicated my Wordpress installation to move to another server. Everything works find except one single file. I created a header-shop.php file to call a certain menu on my shop page. In the first ...
0
votes
1answer
39 views

how to change single post link

I have made a website for a client which involves products tab in navigation. Products are the posts that being posted in "posts". I have a front-page.php which is static. posts are displayed in ...
0
votes
0answers
54 views

Way to add archives as a menu item?

Is it possible to add an Archives dropdown -- like the Archives widget -- as a menu item in Menus?
0
votes
0answers
28 views

Simple modification for menu structure

I'm trying to make a menu for my website, but I want it to be easily modified through original WP menu(dashboard > appearance > menus). I want to add some small thing to the structure of my menu, ...
0
votes
0answers
16 views

Add parent link to its submenu

How to add parent link to its sub menu in navigation bar? I mean any hook, filter or custom navigation Walking? You may know, this problem is coined from the feature of mobile menu, I cannot go to ...
0
votes
1answer
44 views

Any simple way to show 10 previous pages by id to current page in links as a menu

I've been reviewing any plugin that may help in this but I got nothing. For a web using pages instead of posts, I may need to show in each page a menu consisting of 20 previous pages, or maybe 10 ...
0
votes
0answers
20 views

Creating a geo-region Homepage and having Cookie Options

We have a website and we would like to have a feature similar to the HuffPost website. The website shows if the user went to switch to that regional edition and keep the cookie that when they go to ...
0
votes
1answer
41 views

Parsing Menu Items and Blog Posts

Question 1 I'd like to be able to show or hide certain pages in the main navigation menu based on whether or not they have certain prefixes in their title. This is mostly for the purpose of language ...
0
votes
0answers
11 views

How to add a custom menu to a certain post?

So with menus i know you can setup and have multiple different menus, but how can i set a particular post to use a certain menu? I'm doing this LearnDash - and i'd like to have a different menu for ...
0
votes
1answer
146 views

Remove current_page_parent nav class from blog index when in CPT

I'm trying to remove current_page_parent class from the blog index menu item (I got a custom page to display all blog posts and it is in the menu) when navigating custom post type archive page and ...
2
votes
1answer
45 views

how to only add a top-level admin menu without it creating a sub-level-menu

Here is a the code snippet: add_action( 'admin_menu', 'travel_site' ); function travel_site(){ add_menu_page( 'Travel Site Menu', 'Travel Site', 'manage_options', 'travel-site-menu', '...
0
votes
2answers
109 views

How to Add support for sub-menu item description in wordpress?

I am working on a Custom Nav Walker and I want to use Description field in wordpress menu in my theme. The field works fine as far as for First Level Menu items but when I add something in sub-menu ...
0
votes
0answers
72 views

Dropdown menu with Foundation 5

I've had a heck of a time getting Foundation dropdown menus to work. I've got the menu itself together but can't figure out to integrate Foundation's needs for formulating dropdowns to the Walker. ...
0
votes
1answer
32 views

Is it possible to separate all submenu items?

I'm using FoundationPress as a starter theme and I'm trying to separate the submenu. My theme basically generates menus like this: <ul> <li class=" first-level has-dropdown"> &...
0
votes
0answers
14 views

How do i get the menu id currently being edited in the nav-menus.php page?

I am trying to get the ID of the menu currently being edited in the backend menus page( nav-menus.php ) under appearance. Is there any filter that returns the id of the current menu being edited ?
0
votes
0answers
27 views

Menus Removed from Custom Widget Area

I’m hoping someone out there can help me out with this issue I’ve been scratching my head about for some time now. At my place of employment we have a WordPress site on our intranet, running a child ...
0
votes
0answers
22 views

Make menu page not add to click count from homepage to comply with Google indexing practices

Hi WordPress StackExchange, My goal is to make my website be compliant with having 3 clicks or less to the homepage for the services section. I am trying to resolve this error: Documents more than ...
0
votes
2answers
168 views

Use wp_logout_url() in menu creation page

can anyone give me some idea about how I can use the value of wp_logout_url() within the menu creator page of wordpress? As the menu creation page doesn't support php I cannot just put echo ...
0
votes
1answer
12 views

Can't change link for navigation item

I'm customzing a wordpress theme so problem is that i've to change a link. its in arabic for example instead of this <a href='somelink.com'> i want to make it like this but problem is that ...
0
votes
0answers
31 views

Get parent item using Walker function

When using the Walker function I found out that the $item parameter contains the properties current_item_ancestor and current_item_parent but both are empty in all cases no matter if its a menu or a ...
0
votes
1answer
28 views

Site-wide tabs at WordPress website?

Is there a solution to add tabs at the whole site (site-wide) and not just in posts and pages? For example: I need one "tabs group" consisted of 3 tabs, and I like to add it sitewide (the same ...
0
votes
0answers
86 views

How can I add a custom list item to the start of sub menus?

I'm trying to change the output of the Wordpress navigation through a custom nav walker, but I have a some issues I'm not managing to work out. If an item has children I want to add two list item ...
0
votes
1answer
146 views

How do I add a search box to the nav menu?

I would like to add a search box to the nav menu by appending the following code in functions.php (at the end of the file, but before ?>). add_filter( 'wp_nav_menu_items','add_search_box', 10, 2 );...
0
votes
1answer
27 views

Wordpress functions.php does not affect the theme menus

I am trying to customize my pre bought theme. What i try is, to have different menus for each page without using a plugin. Original theme has a function about navigation which uses walker class. here ...
0
votes
0answers
21 views

Reproduce sub-navigation drop down

We have a navigation bar that when you hover over it there is a drop down on 3 out of the 5 menu items; I'm trying to add the other two. I have added what looks like the right code but I can't figure ...
0
votes
0answers
21 views

How can I achieve this menu structure?

I need two main sections which have subsections. Let's call them "Main section" and "Secondary section" Main section is the main page when users come to my blog, its name is "COSAS QUE HAGO" (THINGS ...
0
votes
1answer
100 views

How to add buddypress sub-menu items to other menus

I want to use BPs sub menu items in other menus. By default you get following items to drop them in menus; Activity Notifications Profile Logout I want to add "Profile -> Edit" to the list. In ...
0
votes
0answers
19 views

Link to specific content

I'm messing around with an existing theme at the moment, trying to strip away as much of the WordPress 'environment' as possible to only preserve the text-editing functionality. So, essentially, I ...
0
votes
0answers
13 views

Thumbnails in my album pages

I'm going to insert a navigation bar (with thumbnails) in my album pages. I've tried in different ways, but no one is working. The code, for "template-album" source, is the following. <?php ...
0
votes
0answers
76 views

Add custom dynamic attributes to menu items

Hello I would like to add a data-hover attribute to each element in a specific Wordpress menu. I found the following on the codex. However I don't know how to call each specific nav item to have the ...
0
votes
1answer
27 views

Frontside menu based on custom roles logged in permission

I have two phases to my site, the first is menu, i want my site to hide (normal) menu items if the user isn't logged in e.g when someone visit my site, the menu should be Home About us Products ...
2
votes
1answer
170 views

Custom Walker anchor tag not inheriting attributes

So I am just now learning and playing with custom walkers and I came across this really helpful Stack Overflow question. So I implemented the answer in that answer and added this to my functions.php ...
0
votes
1answer
54 views

How to make menu output links absolute

The page and post links added to WordPress menus are relative in nature. I need a way to force them to be absolute without using the "Custom Link" option. Is there some function or maybe a modifier ...
0
votes
1answer
337 views

Custom nav walker with different output depending on depth

I am trying to redevelop a HTML site as a Wordpress theme, and the HTML menu is as follows: <ul> <li class="current"><a href="#"><div>Home</div></a></li> ...
3
votes
1answer
135 views

How to call “page specific menu items” in template

I have installed a plugin for giving custom command for menu to display on each Page Specific Menu Items, now I need to display these menus on theme header. Can I use anything like wp_nav_menu(). ...
0
votes
1answer
74 views

Vertical Menu items shifting to same line when window size increased [closed]

I've tried messing with float and clear but could get anything to keep this from happening: "Fun" and "Shop" are supposed to be on different lines. Here's the CSS involved with the nav/ul/li/a: ...
0
votes
2answers
138 views

Making menu link open in new tab?

I'm trying to add a top level menu to the left sidebar of the WordPress admin panel. Here's the code I currently have: add_action( 'admin_menu', 'linked_url' ); function linked_url() { add_menu_page(...
1
vote
0answers
37 views

Change submenu markup

I've seen people recommending to edit the wordpress default Walker to change the menu markup and create your own. The problem with this is that I would like to change the markup of the submenu and ...
0
votes
1answer
78 views

Current author archive in navigation menu

I want logged-in user see her/his own author archive page link in top navigation menu,say (a link to a list of all her/his posts). What I achieved so far is this: function my_nav_menu_author_link( $...
0
votes
1answer
90 views

How to dynamically alter all the links in menu via function.php

I have been searching and reading for 3 hours and still couldn't find anything that come close to what I needed and I am still trying understand how wp add_filter, rewrite, etc works. Just started ...
0
votes
0answers
13 views

Wordpress API menu theme location assign doesen't work for second+ item

I'm trying to create 2 menus, one main menu and a footer menu. The script below creates the menus and assigns the pages but it cannot assign the second menu and onwards to the theme menu location. It ...
1
vote
1answer
71 views

How to add programmatically all pages and children to backend menu

I have a big website with tons of content, and I would like to automatically add all pages and their children to the menu in the backend, so I can then rearrange them easily via drag and drop. I ...
0
votes
0answers
58 views

Render a Wordpress menu from outside Wordpress?

I would like to render a menu in another system outside wordpress using SQL to fetch the menu contents and some logic to build the actual menu. I turned on mysql logging to see what wordpress was ...
0
votes
0answers
23 views

Walker Menu with Parent, Children, Children

This website has the menu I have been working on I used the suggestions from a question that was posted about a walker menu and it really helped and the site no longer crashers and the menu partially ...