why don’t you add a class that is the permalink for example?
ie
$output .= "<li class="nav-item $active_class $dropdown_class " . implode(" ", $item->classes) . "">";
(this line is strange first because it’s going to output “nav item $active_class $dropdown_class”…is that what you want?)
but all the same it COULD be
$output .= "<li class="nav-item $active_class $dropdown_class " . implode(" ", $item->classes) . " " . $permalink ."">";
Then call that class in your css
li .menu-permalink {
background-color:blue;
}
li .menu-permalink2 {
background-color: transparent;
}
you can apply the $permalink
to whatever you like (ie li or a etc) and then change the css as needed.
Related Posts:
- Mark error in form using Bootstrap
- Placeholder Color Change in Bootstrap
- Using glyphicon-facebook from bootstrap 3
- How to add text over the image in bootstrap
- bootstrap modal not working at all
- how to install bootstrap to twentyfourteen theme
- How to convert bootstrap tab functionality into wordpress using just 1 query?
- Two column layout using Bootstrap [closed]
- Using/compiling Foundation SASS on live WordPress server
- WordPress \ Bootstrap 4 not building breadcrumbs correctly
- NavWalker Bootstrap Error (won’t dropdown)
- Iframes inside bootstrap tab disappear when tab is shown
- Why is my Bootstrap 5 navbar not displaying the drop down menu on smaller screens?
- bootstrap 4 carousel inside every post of a page [closed]
- Each Slide Has Something Missing In Carousel
- Installing Bootstrap on Twentyeleven Theme
- Enque a stylesheet in functions.php to override Bootstrap
- boostrap on wp-admin backend via plugin installation
- Editor inserting bootstrap css and we don’t know why
- Modify YouTube Embed Code to fit theme
- Bootsrap.css Not Working [closed]
- WordPress keeps showing mobile version on Internet Explorer
- Problems with Bootstrap 3 Carousel Integration
- Use of Bootstrap nav in a page
- Display WP Meta Details in Bootstrap Modal
- bootstrap carousel in wordpress home page showing small images and not responsive
- Why items could not be enclosed within items in WordPress?
- WordPress Loop with different Column sizes
- Bootstrap code acting weird on wordpress
- How To Get WordPress To Pickup Boostrap’s CSS File?
- Connecting Stylesheet in WordPress using less styles
- Learning Html and a new on wordpress designing and developing
- Bootstrap Nav menu won’t toggle collapse when in mobile viewport size
- Link permalink in Twitter Bootstrap “TypeAhead” results
- Bootstrap 4 Theme Post Layout
- Bootstrap and Respond.js
- How to display a list of authors in bootstrap grid?
- Twentyseventeen theme and Bootstrap are seemingly incompatible [closed]
- do_shortcode for twitter doesn’t work well
- Enueue script for bootstrap
- how To Use wp_link_pages With bootstrap 4 for WordPress
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Bootstrap 4 datapicker.js not included
- What does an “&” before a pseudo element in CSS mean?
- Bootstrap carousel not sliding
- How to change the background-color of jumbrotron?
- vertical-align with Bootstrap 3
- Bootstrap Columns Not Working
- Set bootstrap modal body height by percentage
- Center the content inside a column in Bootstrap
- Bootstrap Collapse not Collapsing
- Display custom post type and custom fields within a Bootstrap Carousel
- TinyMCE Anchor Button not showing
- Remove border radius setting from the Gutenberg button block?
- Bootstrap drop down menu with wp_nav_menu
- How to Modify a Widgets UL and/or LI Classes
- Output the aria-labelledby parameter for a nav menu child
- Quicktags on all textarea.. Not working on plugin?
- Make compatible custom menu widget for Twitter Bootstrap
- How can I create custom button in post.php
- CSS style button For WP Login Function in page template
- title, content, feature images
- Bootstrap Drop Down menu is not working
- How to use in Block Editor – react-bootstrap?
- create bootstrap columns inside editor group block
- How can I implement shortcode on click event
- Modal suddenly disapearring [closed]
- Can you target a widget_class in a register_sidebar?
- Ajax Button to load more Posts into a timeline
- Using Select HTML in Bootstrap Popovers
- Using twitter bootstrap in a theme
- Download a file and scroll to bottom div on button click
- element not working in Safari [closed]
- WordPress comment submit button substitutes/options
- Page access only from a specific page in wordpress website
- Get the featured image url of clicked post
- Different column width in 2 rows with bootstrap and custom post types-different classes needed
- How to create a WP theme that use BootStrap? [closed]
- wp_enqueue_script() not working
- How to create social Share Buttons Without Plugin
- Bootstrap within shortcode
- Ajax call undefined index
- Bootstrap slider not working
- Placing Lock Icon on WooCommmerce “Place Order” Checkout Button (WordPress ‘ignoring’ Changes…)
- How to align Button on the right of the image on desktop but below the image on mobile
- Link Dont work in first page Hero image
- Split post or page content in two or more columns
- How to properly hide the div of an inline collapsible button?
- Gutenberg blocks shortcodes compatibility
- NavBar Button Clicks (need 2 clicks rather than 1 click)
- Bootstrap tabs are not being clicked in WordPress loop
- button to toggle css styling / div visibility?
- How to create 2 preview button in a post?
- Eliminate menu collapse button on website
- How to include backend buttons css on frontend?
- Change text “My Basket” in woocommerce artificer theme
- change the icon of a custom post type in WordPress to use twitter boostrap
- Button to execute shorcode [closed]
- WP Job Manager – Show recent jobs as cards
- Convert a custom bootsrap based menu to wordpress nav walker