Questions tagged [wp-nav-menu-item]

59 questions
0
votes
2 answers

WP Bootstrap Navwalker not displaying 'current-menu-item' class

The li that WP Bootstrap Navwalker generates doesn't include "current-menu-item" class causing me problem styling the current active menu item. I added the code below in my functions.php file but it's not working because the li don't have…
Franz
  • 137
  • 1
  • 5
  • 16
0
votes
1 answer

Adding "Active" Class to current post ancestor menu item parent in wordpress

I have a menu like this in wordpress Parent Item ( A Page ) Child Item ( A Category ) When I am in the Child Item (category) page "current-menu-parent" class is added to the "Parent Item" , that is quite useful. But When I view one of the post…
Raitul Islam
  • 75
  • 1
  • 8
0
votes
1 answer

Quotation marks and apostrophes not displaying in PHP

I am trying to attach an onclick attribute for google analytics to a wordpress nav menu item. add_filter( 'nav_menu_link_attributes', 'wpse121123_contact_menu_atts', 10, 3 ); function wpse121123_contact_menu_atts( $atts, $item, $args ) { // The ID…
0
votes
0 answers

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 have the CSS for my menu. The menu has been…
tassawarr
  • 1
  • 2
0
votes
0 answers

How to create this kind a menu using wp menu?

I want to create below code using wp_nav_menu. How do I create this code using wp_nav_menu? Also how to change UL class page to page using wp_nav_menu?
0
votes
1 answer

wordpress wp menu in home page and inner page

My main wp_nav_menu is called header-menu and that menu like this Home About Insight Test 1 Test 1 About 2 Test Test I want to call this menu in home page without showing sub items . That can i do using
Buddika
  • 11
  • 1
  • 6
0
votes
1 answer

wordpress how to call menu

I try to use wp_nav_menu in my website. My menu structure following like Home About Insight Test Test About2 Test Test When i call menu using like this
Buddika
  • 11
  • 1
  • 6
0
votes
1 answer

WP Metabox on nav-menus for virtual pages not showing the url

I have some virtual pages on wordpress, and the page is stored on transient data when page is created or title changes. I'm trying to add those pages on the metabox on the nav-menus.php. Almost everything is working as expected but the url is…
3pepe3
  • 573
  • 6
  • 23
0
votes
1 answer

How can I insert a dynamic menu item in a specific place?

I can place a new menu item to the end of the root level menu items by using this: function bv_show_book_online_menu_item($items, $args) { if(bv_can_book_online()) { if($args->theme_location == 'main-menu') { $items .=…
Lee
  • 4,187
  • 6
  • 25
  • 71
0
votes
1 answer

Changing URL's in wp_nav_menu Wordpress+Symfony

In my symfony project I'm trying to use wordpress for free user-friendly content manager. My problem is, when I'm trying to take Wordpress menu, like: $menu = wp_nav_menu( array( 'menu_id' => 'top-menu', ) ); Ofcourse menu items…
Rallyholic
  • 317
  • 1
  • 3
  • 21
0
votes
1 answer

how to add class to certain li element in wp_nav_menu

i'm trying to add a class to the li elements in my wordpress wp_nav_menu. I followed a couple of answer on here but can only get part of it working. So for my nav menu, i have > functions.php > //REGISTER NAVIGATION MENU function smtg_menus() { …
grimesd
  • 101
  • 3
  • 13
0
votes
1 answer

WordPress change position of custom wp_nav_menu_items

I have a sidebar menu which is populated through the normal WordPress menu (Appearance > Menus). I also have a custom menu created using 'wp_nav_menu_items' that gets added to the bottom of the WP menu. My issue is I need to be able to change the…
user1788364
  • 1,141
  • 3
  • 19
  • 33
0
votes
1 answer

Javascript how to reload the page when clicking on the link in the same page?

I apply a ready-to use plugin for the mobile navigation, but I find a problem. Because the website is one-page site, and the links in navigation direct to different sections in the same page by using hash tag. When I click on the hamburger and…
Terry Chan
  • 41
  • 2
  • 10
0
votes
2 answers

How to add active class in wordpress submenu?

I have a list of sub-menus in the page which will get the title of each article. But I hope the list style will be different from others when it is in the specific article page. Now the tag has only a class named "list-group-item", and I hope…
1 2 3
4