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
19 views

WP Bootstrap Nav (not JS, not missing ID)

For clarification: I'm using a bs4 navwalker, and Bootstrap 4. Creating a WP Theme from scratch, so I'm learning, and experimenting. I've spent a few hours reading through a variety of issues ...
0
votes
1answer
24 views

set certain item in nav walker to active when on archive pages or singles

I have created an event custom post type and a link in my menu to the archive page for that event (/events). I'm using wp_nav_menu() to call the menu. When I'm on /events the menu has the ...
0
votes
0answers
23 views

Change markup for just 2nd list element in custom Walker menu

I have been struggling a bit with this idea. The thing I want to achieve is that all elements are regular dropdown but the second one is a megamenu styled item. And for that I have prepared markup ...
0
votes
2answers
23 views

How to add nofollow to the_post_navigation?

I tried to edit original the_post_navigation, inside the loop, so I could get the rel="nofollow" inside of it the_post_navigation( array( 'mid_size' => 3, 'next_text' => __( '...
0
votes
0answers
11 views

How can I hide a menu item from navigation menu when that section is empty?

I want to hide the news section from navigation menu when there's no news in the site.
0
votes
0answers
10 views

How to add a menu when user is logged in (via my own database table)

I am trying to let the user login via my own table that I created in phpmyadmin. I also am using an insert php plugin so that I can insert php into my code. How can I make it so the user can see a ...
0
votes
1answer
9 views

Navwalker - Menu items not displaying - menu bar has height of 0 [closed]

I'm setting up a Wordpress theme from scratch and I've run into a problem trying to integrate Navwalker into the header navbar. I've followed the instructions. I'm able to: Create a menu through WP ...
0
votes
1answer
23 views

Bootstrap Nav Walker Sub Menu Image

I would like to add images to each item of my sub menu. At the moment, i've added a custom css class to each menu item in the wordpress admin dashboard and add to my css a class like that : .menu-...
1
vote
0answers
127 views

Custom Walker_Nav_Menu issue with variables on PHP 7.3

I've made this custom walker that extends Walker_Nav_Menu for "mega menu" implementation. It works perfectly fine from PHP 5.4 to PHP 7.2, however it it has problems on PHP 7.3. The idea is to compare ...
0
votes
0answers
25 views

current-post-parent for custom post type

I have 2 archive pages on my site. First "News" is for standard wordpress posts. Second "Projects" is for my custom post type. When I go to specific post from "News" archive then my menu position "...
-1
votes
0answers
11 views

Second sponsor logo header

I have in my cause I think a simpel question. I need to have a sponsor logo inside my navbar. I have my main logo but I should need a second logo "driven by BMW". just only the BMW logo is fine no ...
1
vote
2answers
58 views

How to have the Header show different content on different pages?

I made a Navigation (primary) via Appearance->Menus which navigates the user to anchor tags on the side, but I also have subpages, where I want a different navigation - only with my 'Home'-button in ...
1
vote
2answers
44 views

How can I add a custom class to only nav sub-menu > li > a items in WordPress?

I've this DOM here: <ul class="sub-menu"> <li id="menu-item-1424" class="menu-item menu-item-type-taxonomy menu-item-object-product_cat"> <a href="#">Item</a> &...
-1
votes
1answer
28 views

Bootstrap 4 mobile menu not working for Wordpress Development

I have a custom bootstrap 4 theme I am building out in wordpress. The drop down mobile menu does not work when the hamburger menu is pressed at smaller viewports. I am not sure if I need to add a ...
0
votes
0answers
25 views

Swap menu or menu item based on link click ( user input )

I maintain a website for the production company I work for. I'd like to display in the main menu a specific director list based on whether the user has clicked either AU or NZ. This will be a link in ...
0
votes
0answers
13 views

Show Custom field value instead of title in WP Menu

any idea how to display custom field values (I am using acf for those) in a Wordpress Menu instead of the respective wp_title? Have nothing to show, as I have nothing tried yet, as I haven't found ...
0
votes
1answer
23 views

My custom pagination not displaying

I'm testing a custom pagination feature but my pagination is not showing, is there something I forgot to do? here's my arguments and query inserted in my template: <?php ...
1
vote
1answer
156 views

How do I create page navigation linking to each H2 within the page? [closed]

I require each page on a WordPress site that I'm developing to have page-level navigation linking to each H2 on the page. How do I best automate this?
0
votes
0answers
12 views

Paginate by individual page links, not /page/1, /page/2, etc

I'm moving a group of 20 or so pages from another CMS into WP. These are pages not posts. Each page is a chapter in a book and each page has bottom nav links much like a blog index page. In our case ...
0
votes
1answer
78 views

get_next_post() and get_previous_post() return wrong posts

I’ve been trying to retrieve the next and previous post in one of my Wordpress templates. Please note that I want to get the full post object instead of just the pre-formatted links to the posts. The ...
0
votes
0answers
10 views

odd issue at navbar positionings

So something causes main navigation to not be displayed, it flexes out ok but I'd still need top items be constantly visible. overflow: visible does not fix this nor does z-index, nor removal of ...
1
vote
1answer
23 views

How to get “nexepagelink” and “previoiuspagelink” in wp_link_pages?

I'm trying to get pagination in my pages, so I use this default option: <?php wp_link_pages( array( 'before' => '<div>', 'after' => '</div>', '...
0
votes
0answers
25 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->...
1
vote
1answer
24 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
16 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
2answers
32 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
22 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
33 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
2answers
38 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
40 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
28 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
29 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
35 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
43 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
107 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
16 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
15 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
25 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
26 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
37 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
27 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
75 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
33 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
84 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 ...