Questions tagged [navigation]

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

263 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
593 views

How to move parent li to end of child ul

I'm working on translating a site from HTML/CSS to Wordpress, and I've come across an issue. In the spirit of keeping the site fully customizable from the dashboard, I've been using Wordpress' default ...
3
votes
0answers
60 views

Select menu should display categories and the item's depth

I have a select menu of a custom post type in the header.php: <?php $selectloop = new WP_Query( array( 'post_type' => 'products', 'posts_per_page' => -1 ) ); echo '<form>&...
3
votes
1answer
354 views

Generate a tabbed submenu — from taxonomy term or submenu item — with sample content

I'm looking to generate a tabbed submenu from taxonomy term or submenu item and include sample content (three items per term/submenuu item). The styling I can do, the problem is the html generation. ...
2
votes
0answers
30 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 ...
2
votes
0answers
15 views

Change where navigation bar links?

I have a client with a WordPress blog who wants to have her website run two separate websites in the same WordPress installation by duplicating pages and changing the place that the navigation bar ...
2
votes
0answers
876 views

load next and previous posts by Ajax and URL update

In my wordpress site, I have next/prev link in single.php , I want to ajaxify them and i found below script and it's working but it's not changing the new post URL(URL not updaing). After 2 hours ...
2
votes
1answer
330 views

connect last post with first post

next/prev from my first to last and the other way around cant find a solution for that i am using this code for next <?php next_post_link('%link','<img src="img-location"/>'); ?> and ...
2
votes
1answer
536 views

How to display dynamic content in start_lvl function

I am creating a custom nav walker but having trouble outputting parent menu item title in start_lvl function. I want to output it right after the <div class="dropdown"> in the following ...
2
votes
2answers
1k views

How to add a parameter to <a> links in the nav menu?

I have to add itemprop="url" to the links of the links in the navbar of this site. In the settings I found the function wp_nav_menu(). Even after reading the WP codex, I am not able to make the ...
2
votes
0answers
529 views

Rendering of custom walker menu function not working properly

I have a custom function for my nav walker menu that adds custom php/html to it, which can be seen below. It renders a twitter bootstrap dropdown menu that I would like to put my login form in. ...
2
votes
1answer
407 views

Two Navigation Menus - secondary nav is including main nav

Two Navigation Menus in Themes Produce the same menus? reference the subject on page link above. i created two navs, yet the secondary nav includes all pages. the main nav is fine, but the secondary ...
2
votes
0answers
135 views

Exclude Post Format from next_post and prev_post

Is there a way to exclude a specific Post Format from next_post and prev_post? I want my asides to show up in the regular list of posts on the main blog page, but when a user is navigating through ...
2
votes
0answers
810 views

Hierarchical Custom Posts - Highlighting Current Post in Sub-Menu

I have created a hierarchical custom post type called events and have used wp_list_pages to list the sub-posts for each event post (See below). This navigation works great, but I cannot figure out how ...
1
vote
0answers
14 views

Reuse a custom WordPress menu on another WordPress website

My WordPress website consists of two separate WordPress installs (one lives in a subdirectory). From a visitor's perspective it feels like one single website. To achieve this I had to manually ...
1
vote
1answer
22 views

How to dynamically populate a dropdown

I am tasked with creating a subnav in the body of our custom-built pages. The nav's last item is supposed to be a clickable dropdown (a "more" button) that can dynamically populate if extra pages are ...
1
vote
0answers
66 views

Hide Login information in Account settings in Buddy Boss

First time working with Buddy Boss. I managed to customize the navigation items on the profile page, but I can't find a solution for the Account settings page. What I'm trying to achieve is to hide/...
1
vote
0answers
11 views

Creating a navigation menu to see where you are on your website

I want to create a "navigation" menu - I don't know what they are called and I'm having a hard time googling it as it is not a navigation menu as such or a sub-menu or pull down menu ect. I just want ...
1
vote
0answers
22 views

How to create a submenu that will navigate through different posts in the same page

I came across this website and it will be the best explanation of what I want to create if you just take a look but yourself. I asked the creator but he doesn't reply. Please visit: https://www....
1
vote
0answers
22 views

Hide post navigation if current post is in a category with only one post

I have the CPT "proyectos" and the custom taxonomy "servicios" I have navigation arrows inside the single CPT template to navigate between posts in the same category. Some taxonomies have only one ...
1
vote
0answers
317 views

“data-vocabulary.org” is showing warning in Search Console for Breadcrumbs

Just now the data-vocabulary.org is deprecated, so what is the solution to solve this. Should I replace the data-vocabulary.org with schema.org This is the code added in my WordPress: <div class=...
1
vote
0answers
73 views

Making a navigation header menu with bulma, need some advice

I'm relatively new to wordpress and php and currently I'm in the weeds trying to wrap my head around creating a custom navigation menu using the structure and css instructions provided by bulma. ...
1
vote
0answers
40 views

current-menu-item class is not added

Trying to style the active class of my navigation menu on my one-page theme, I have noticed that wordpress does not assign the current-menu-item class. Why is this happening? Can you help me? It is ...
1
vote
0answers
27 views

How to show all pages in blog navigation?

I'm trying to show all pages (ex. 6) in pagination navigation in my blog. I've got following code in my functions.php: function numeric_posts_nav() { if( is_singular() ) return; ...
1
vote
0answers
42 views

Restoring default article pagination on archives – Removing custom limits

I am working on a website that is a customised WordPress installation running WP 5.2.4. There are a number of categories, as follows: main_category (id 71) other_cat_1 other_cat_2 etc. The post ...
1
vote
0answers
214 views

Automatically list top level menu item child pages

I am building a website that has a lot of pages. The client is not a big fan of the Wordpress menu builder works (in appearance -> menus), and we have come to the conclusion that the best way for the ...
1
vote
0answers
229 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 ...
1
vote
1answer
312 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 ...
1
vote
1answer
55 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/...
1
vote
0answers
947 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="...
1
vote
2answers
19 views

I want to hide the navigation menu on a particular page

I want to hide the navigation menu on a particular page. I know how to find the page id, but I am clueless about how to find the rest of the stuff, it would be great if someone could look into my blog'...
1
vote
0answers
51 views

walker - 0 level on submenu formatting

I need to create this structure: <div class="submenu-box"> <ul class="submenu-box__links">...</ul> <ul class="submenu-box__links">...</ul> <ul class="...
1
vote
1answer
78 views

How to share primary navigation of main site with subsites usining switch_to_blog

I have managed to switch the primiary navigation menu of my subsites to show the main site primary navigation. However, it renders above the site-header instead of in the menu location dictated in ...
1
vote
0answers
73 views

How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin

I am New to Wordpress and Don't know Coding hecnce on my website i have two section one for blog and other is episodes with seperate catageory and to navigate between the post in same catageory, So ...
1
vote
2answers
821 views

How to wrap the list with custom class using wp_nav_menu?

I want to display 4 column footer menu. but when I add new menu the wp_nav_menu create a < li > and add every menu items to it. now, how can I wrap every li element with a custom div tag with a ...
1
vote
0answers
81 views

Wordpress - Responsive navbar doesnt work

i have a website that uses wordpress. I created a navbar but it doesnt work properly. In small screens. After clicking "open menu" The menu doesnt appear. My Codes: PHP: <div class="menu-bar"&...
1
vote
1answer
76 views

Static page to one page- menu inactive items highlighted

The website I am working on has a one-page architecture with a couple of static pages. The main issue is that when I click menu item from a static page (construction of that menu item in my WordPress ...
1
vote
1answer
496 views

How to Restrict Previous & Next Post Link to Posts of Same Category?

I am using a category to segregate all posts of that one category to feel like a complete website sub-section. So the main posts feed is using a plugin to hide posts of that category, and I am using a ...
1
vote
0answers
1k views

Check if menu_item has children or has parent

I am using wp_get_nav_menu_items() to get the menu items and this is my HTML structure. Only items with submenu items should have the dropdown class attached to the li tag. <ul class="nav navbar-...
1
vote
1answer
36 views

Adding dropdown box to WordPress menu

I've created a navigation bar through the WordPress menu function. Is there a way to turn one of the links into a dropdown box, where selecting the box reveals all subpages?
1
vote
0answers
37 views

Tell the difference between a term and page when they have the same ID

I'm building a branching navigation that displays pages, children pages and a custom taxonomy (named region/s). Everything works as intended except in any instance where a region/page have the same ...
1
vote
1answer
262 views

Combining 'depth' with 'include' in wp_list_pages()

I am using wp_list_pages to display my navigation that contains only specific top-level pages using the include parameter. However, I would like to display the child pages of those top-level pages. ...
1
vote
0answers
172 views

automatically append menu parent as first item in submenu with nav_walker

In my navigation, items which have children should only be clickable to open / close the sub-menu. Because of this I'm searching for a way to append this item as first item in sub-menu so the page is ...
1
vote
0answers
92 views

Help with Sub and Sub-Sub Navigation

I have utilised code from this posting: Display grandchildren on child and grandchild pages using wp_list_pages to create my menu here: http://new.leicesterymca.co.uk/youth-community/our-work/ As ...
1
vote
0answers
122 views

One menu for frontpage (one pager), and a different menu for posts

(TLDR version at the end) I have set up a website for a company who wanted a "one page" website. This is delievered and done. My main menu consists purely of #anchor tags. They have now started ...
1
vote
1answer
54 views

Show only one page link in content pagination

Im currently using the wp_link_pages tag to show the pagination links for content that is split inside the Post. Is there a way to show only the next page link and not all page number links or not ...
1
vote
0answers
1k views

get_adjacent_post - in same term or category not working

I am building a Next and Previous Post navigation for my 'Single post' pages, inside a plugin. What I am trying to do is get the Prev/Next post within the same category of a Custom Post Type. So I ...
1
vote
0answers
444 views

Create menu / submenu from category subcategory and posts

I have a custom menu made up of pages and categories and I am trying to output the category and subcategories as well as the last 4 posts from each category/ subcategory. In trying to use a walker ...
1
vote
0answers
288 views

Categories as main menu items and subcategories as nested lists

I am new to WordPress and am trying to make my website. Would it be possible to list categories and subcategories as a nested list with links in the main navigation menu. What am i trying to achieve ...
1
vote
0answers
21 views

Navigation doesn't render when wp is hosted

I have created a theme on my local host and it works fine. I am using the walker function in order to get the bootstrap navigation. However when I upload the site on godaddy the navigation doesn't ...
1
vote
1answer
1k views

Programmatically set current-menu-item using wp_nav_menu

I'm calling wp_nav_menu programmatically on a class and I'd like to be able to set the field that will be shown as the current-menu-item but I don't see an argument for that. It seems like I may be ...

1
2 3 4 5 6