Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [navigation]

A structure with links used to help you navigate from page to page.

0
votes
0answers
12 views

get_next_post() not working with future post status

I'm using in single post template simple navigation below the post content: $next_post = get_next_post(); if($next_post) { $next_title = strip_tags(str_replace('"', '', $next_post->...
0
votes
0answers
14 views

bootstrap navmenu button not working properly

menu in question: <nav class="navbar navbar-expand navbar-light bg-light" role="navigation"> <div class ="container-fluid"> <button class="navbar-toggle ...
1
vote
1answer
18 views

Is this format possible with a custom Nav Walker class?

I'm looking to have the following output on a wordpress menu <nav> <a href="#">Link</a> <a href="#">Link</a> <aside> <a href="#" class="custom-class"&...
0
votes
1answer
14 views

wp_nav_menu() | Outputting my own custom code using built in features

I have created (more so WordPress has) using this: <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'menu_id' => 'primary-menu' ) ); ?> It outputs this: <...
0
votes
0answers
9 views

Create navigation that changes depending on how you get to a single page?

I'm trying to make conditional navigation along the lines of "if a user goes into the tag "foo" make sure the navigation once in the single page only goes back and forth in the "foo" tags. But if the ...
0
votes
1answer
25 views

Wordpress “add to menu” button not working

I moved my WordPress installations from my old server to a new one. I copied all databases..etc and things seem to be working fine. (I have already migrated servers before, so I guess I know how to do ...
0
votes
1answer
29 views

How to make a navigation that shows title on hover? [on hold]

Hello everyone I have a question I want to make a navigation in WordPress with a title if you hover your mouse over it then he shows the title
0
votes
1answer
21 views

Creating navigation out of specific IDs and their children?

I'm looking for a way to list three specific pages in a nav-menu (I want to get these pages by their unique page ID's), and also list the children of these three pages - appended to each list item, in ...
0
votes
0answers
17 views

Creating navigation menu out of page-related parent/child/grandchild relationships

I am trying to create a sidebar navigation menu, that detects what pages are related to the page you are currently viewing, and then outputs the whole hierarchy of this family-tree inside a tiered ...
0
votes
1answer
26 views

I want the “next” and “previous” buttons to appear in my custom navigation function

I'm looking for a way to display the two buttons "previous" and "next" of the navigation of my page, but with the code below, I can only show one. I do not understand what's wrong in the code (below): ...
0
votes
0answers
12 views

Center HeroMenu (Plugin) Navigation [on hold]

I'm trying to center the navigation on my website. The navigation is done by HeroMenu(plugin) it's a plugin that control my navigation. The website is brothasonline.com to see a example.
0
votes
2answers
37 views

Unable to edit Navigation bar

I should first mention I am fairly new to wordpress and web development. I was given the task to update an existing site which includes the navigation bar. I have been digging through code trying to ...
1
vote
1answer
25 views

Third level navigation class

I'm currently working on a third level navigation. The output should something like this: <ul class="menu"> <li> <a href="#">Level 1</a> <ul class="sub"> ...
1
vote
1answer
23 views

previous/next_post_link in the same sub-category?

As the title: is there a way to navigate between posts of the same subcategory using the previous_post_link and next_post_link functions? But maintaining however both the category and the sub-category ...
2
votes
1answer
24 views

WordPress wp_nav_menu with a nav tag

I'm thinking about wrapping the wp_nav_menu with a nav tag instead of a div tag. I've read at the WordPress codex that the container argument is only for using ul or div. Do you guys know a way how ...
0
votes
1answer
33 views

Navigation dropdown issue, need it to work on hover

I have created my own theme from Bootstrap 3, everything went ok except for the navigation. After many hours trying ot figure out why my navigation didn’t drop down, I finally fixed and thought that ...
0
votes
0answers
31 views

Wordpress Navigation Menu (current-menu-item) is not Showing

I have created a menu called "Main". and i am displaying it by calling : and in function.php: and the output is: As You Can see none the (current-menu-item) nor the (active) class is showing the ...
0
votes
0answers
57 views

How to fix “Supplied nav_menu_item value missing property” after update to Wordpress 5.0

Please help. We have page on WordPress with our custom theme and minimum plugins. After update WordPress from 4.9 to 5.0.2 we have error in the admin page on Themes => Customize. Everything else is ...
0
votes
0answers
13 views

next_post_link() and previous_post_link() in single-cpt.php file not working

I am trying to display links to previous post and next post in for a custom post type regardless of whatever custom taxonomies they are attached to. I have a custom post type called experiencecont ...
0
votes
0answers
27 views

Show all menu levels except top level. How to exclude top level of a menu?

I have a menu that looks like this: Women and Men har the top level menu items while the lower nagivation menu items are the children. The menu structure looks like this: Women New styles ...
0
votes
0answers
13 views

How to add a checkbox (or extend in any way) to Menu Custom Link metabox?

I'd like to add a checkbox to the Custom Links metabox. User will be able to select true/false. Based on the value, the front end will or will not display data. I've tried extending Walker_Nav_Menu ...
-1
votes
1answer
21 views

Add a navigation menu item using MySQL

I want to insert Wordpress nav menu items into MySQL using PHP. I dont think i can use wp_create_nav_menu() because I need to build a preliminary menu from the categories (over 100 cats!) then a ...
0
votes
0answers
24 views

Splitting stacked navigation into two columns for mobile

I'm new to HTML, taking my first class at university now, so apologies if this is a dumb question. I have a stacked navigation which I want to split into 2 columns when downsized for mobile use, but ...
0
votes
1answer
35 views

How to add post page pagination to template part?

How can I get this page to display the post page pagination? I'm using a custom blog template with a get_template_part. https://www.nowitconnects.com/blog/ <?php /** * Template part for ...
0
votes
0answers
23 views

Where to place a svg chevron down in my custom walker?

i am a bit stuck with the custom walker in my Wordpress theme. I wanted to place a svg chevron down on the first link when a submenu is detected. My theme uses a svg file with all the svg paths. The ...
0
votes
0answers
7 views

Add an option to Appreance->Menus->pages

If I go to wp-admin and add a page, that page appears under Appearance->Menus->pages. How can I add the same link under pages without adding a page? By PHP ofcourse. I know how to add an item to the ...
0
votes
0answers
55 views

How to apply individual menu item's “CSS Classes” to <a>, not <li>?

WordPress' Menu constructor allows you to apply custom "CSS Classes" to menu items... However, those classes are applied to the list item which wraps anchors, and not to anchors themselves... <...
0
votes
0answers
30 views

Pagination doesn't work in query post in tag template

In tag template I use the following query post: global $query_string; // required $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; ...
0
votes
1answer
23 views

Additional CSS for the nav menu

I have customised the navigation menu on this site. Each main menu item has its own hover colour. My question is, how do I change the selected menu item colour to match in the sub menus. Currently I ...
0
votes
1answer
27 views

How do i create navigation links like this in wordpress? [closed]

Currently, I am using an Avada Theme and I would like this navigation to be in the shop and product pages.
0
votes
1answer
55 views

WordPress Menu item > Sub menu Class update

I'm a newbie to WordPress core and development process. As I have a little knowledge of WordPress functions. But I need the help from you guys. Actually, i'm developing my first theme and i already ...
1
vote
1answer
708 views

HTML Bootstrap navigation menu to Wordpress menu using wp_nav_menu

I am trying to convert my existing HTML Bootstrap menu into Wordpress theme menu. I already created menu called "Primary" in Wordpress, but can't get it in theme exactly the same as in HTML. My HTML ...
0
votes
0answers
22 views

how to remove logo image hyperlink for wordpress

can any one tell how to remove the navigation menu for mobile & desktop view. and how to stop the logo redirection URL.
0
votes
1answer
259 views

Twenty Seventeen - Navigation bar, logo, header size

I'm new here, like 3 days learning about WordPress, I think is very good, have some problems to understand the CSS, I think I'll get over it with time. I have a problem maybe someone can help me. ...
0
votes
1answer
79 views

Override the WordPress default pagination markup

I want to render the WordPress posts pagination markup with my own HTML markup. My theme has a pagination markup with ul > li format. But the WordPress default pagination markup is different than ...
0
votes
1answer
34 views

Move the social media icons to the left of a Wordpress nav menu for Soledad child Theme

I've been trying to move some social media icons (class="penci-topbar-social") to the left of a wp_nav_menu element for a bit and am stumped. I tried moving the social media code above the wp_nav_menu ...
0
votes
1answer
203 views

Add class to active top level (grandparent) menu item

I'm building a site with a mega menu. Here's what the structure looks like: <ul> <li class="active-grandparent">Grandparent <ul> <li>Parent</li> <li&...
0
votes
0answers
16 views

Show archives as a drop-down in the main navigation menu

I am using the Independent Publisher: 2 theme. It looks like this in action. I would like to be able to access my blog archives by clicking on the navigation menu, as a drop-down. In other words, I ...
0
votes
1answer
25 views

Dynamic next and previous post links

Is there any way to change the next and previous post links dynamically. By default the previous post link takes to the previous post. However I want it to link to some different post, that I posted ...
1
vote
1answer
26 views

Programmatically add existing pages and subpages to Appearance Menu

I have inherited a site with over 600 pages/subpages. I plan to use a plugin to change the way the navigation displays but it requires the pages to be in the Appearance -> Menu in this page: /wp-admin/...
4
votes
1answer
306 views

Next/Previous Links in same category

I've been pouring over this problem that seems really minor, but I can't seem to solve it. I'm trying to make next/previous links that only link to the category that the post is in. This is for a ...
0
votes
1answer
38 views

Add href to <a> tag in nav menu for mobile

I have a primary menu which is displayed for desktop <?php //Show the navigation menu wp_nav_menu(array( 'theme_location' => 'primary-nav', 'menu_class' => '...
0
votes
1answer
2k views

Add active class to wp_nav_menu

I'm using this code but it's not working function special_nav_class($classes, $item){ if( in_array('current-menu-item', $classes) ){ $classes[] = 'active'; } return $classes; } ...
0
votes
1answer
193 views

Remove a class from a <li> using Walker

I want to remove a class from 2 lvl depth,from li tags of ul class="sub-ul".How can I do that using Walker? <ul class="navigation d-block"> <li class="d-...
1
vote
0answers
474 views

bootstrap menu parent toggle and arrow

I have created a menu in Bootstrap 4: Here is the code: <section class="menuBar"> <nav class="navbar navbar-expand-lg navbar-light" data-toggle="sticky-onscroll"> <div class="...
0
votes
0answers
269 views

Bootstrap 4 navwalker - multilevel menu

I'm using this nav walker in my Wordpress project. I want to create multilevel menu, for example. What I need to change to get it work? Or maybe is it another walker for BS4 with multilevel menu ...
0
votes
0answers
36 views

wp_get_archives() --> only show posts, a user is allowed to read?

i'm trying to build a navigation in which all posts are listed in a sidebar (all the time) -> but only the ones a user is allowed to see. i tried to do this with wp_get_archives() which gives me a ...
1
vote
1answer
2k views

Multi Level Bootstrap Navigation Menu in WordPress

I am converting a static website made with Bootstrap in WordPress. Here is my bootstrap multilevel navigation menu code: <section class="menuBar"> <nav class="navbar navbar-expand-lg ...
0
votes
0answers
18 views

Plugin for Content Restriction: Individual NAV for each User (contains ordered & segmented list of all posts he's allowed to see)

I'm unsure about the right way to realize one of my next projects and would love to hear some of your thoughts. I'm quite sure that there is already a plugin out there that contains a solution to my ...
2
votes
0answers
21 views

Use walker for specific menu, or avoid use of walker

I'm trying to solve a particular problem and having trouble figuring out which way is best. So, I have a menu (generated through WP's menu creator) and would like to pull the featured image of each ...