Please try something like this.
function add_button( $output, $item, $depth, $args ){
if (in_array("menu-item-has-children", $item->classes)) {
$output="<button type="button" class="btn btn-circle">
<i class="fa fa-chevron-circle-down"></i>
</button>".$output;
}
return $output;
}
add_filter( 'walker_nav_menu_start_el', 'add_button',10,4);
Related Posts:
- How do I programatically empty trash?
- Primary and Secondary Button Classes
- How to insert a Button or custom text on twentyseventeen header
- Override admin submit_button() functionality
- Remove “Save draft” button without using CSS
- Download a file and scroll to bottom div on button click
- Remove Save Draft & Preview Buttions.. and also Statius: Draft & Visibility: Public
- Add multiple custom buttons with custom links after add to cart button for every product
- Loading elements with a button
- How to align Button on the right of the image on desktop but below the image on mobile
- How can I center the “Buttons” in the WordPresse editor?
- NavBar Button Clicks (need 2 clicks rather than 1 click)
- Using button from the function submit_button() triggers alert
- Create Button Using Provided Code
- Back button to previous page and breadcrumbs
- Button to execute shorcode [closed]
- PayPal buttons not working after 4.2.4 upgrade
- Button not working?
- submit button not work
- How to add “Insert/Edit link” button in custom popup tinymce window?
- Add popup window to TinyMCE buttons
- Add button to TinyMCE bar without creating a plugin
- How to add multiple buttons to TinyMCE?
- How can you change the ‘Insert into Post’ title in the media button?
- Add Button To Top Toolbar in Gutenberg
- how to grab first link in post… and of course call it
- How to create a link to jump to “Leave a comment” part?
- How can I link a file in admin with a button?
- Displaying a button on each post
- Login Button CSS
- Dont’t change active Button while I’m listing a category?
- Gutenberg Button Border Radius Default
- How to make a search button that will search my website?
- Paginated Posts – Social Media Buttons Share First Page URL
- Remove add to cart icon/view product button woocommerce
- Redirect customer to login if not logged in when proceeding to checkout
- Add buttons to the new TinyMCE WP Editor. Javascript API
- Customizer AJAX using buttons
- It is possible to add extra button under the ‘publish’ button in the post of wordpress? and how?
- Button inside Custom Meta Box triggering the Update Button
- show/hide div with simple jQuery script [closed]
- “Loadmore” button is not working in buddypress [closed]
- Change the text of the publish button to Save
- How to edit the default icon of Add Media button?
- AJAX on Front-End Button Click not working – Custom Plugin
- magic “MENU” button under Twenty Twelve theme
- Is there a way to direct unregistered user to registration page when click a link?
- adding a button to the media uploader
- Skewed / slanted button within elementor [closed]
- Cannot changing login button color, have tried theme, plugins… is it GoDaddy managed?
- Add to Cart button displaying twice on Shop Page Woocommerce
- Edit value=”” of a button in child theme
- add share buttons above my posts without plugins
- how to change the “return to shop” button text? [closed]
- Page menu not showing in admin, new Page button missing in toolbar too
- How to implement custom buttons into individual posts?
- Share buttons Facebook Twitter, just like wordpress.com without webservice
- URL redirection
- how give a link to an Elementor Pro widget with variable part
- Add a product category to a specific product via a button
- Change button link to add nonce
- How can I change page content for good once a button is pressed?
- Redirect from wp-admin back to page
- How to edit button permalink inside function.php using a child theme?
- How do I make a custom “Read More Blogs” button for my blog page
- How to add contact seller button in product page
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- How to add excerpt and read more button to category archive page
- WordPress Toggle Menu has stopped working
- when clicking update after page editing it returns this page not working in wordpress
- how to send two forms with one click (script ninjaforms id)
- Show only content in page after action click in WordPress admin
- How to display a page dependent on a url parameter supplied by a form/button page?
- Hide download button from audio player
- hide load more button if there are no posts left to display
- excerpt button not going to custom post page
- WordPress Settings – Custom Button actions
- Make a button change meta_value
- Adding a button to a product if it’s in a category, then linking to that category
- Functions are causing errors
- Display multiple “save draft button” on a post edit
- disable publish button until condition is not met
- just show the field comment by clicking button
- How to insert image from link in TinyMCE
- Woocommerce – Remove ‘Buy Product’ Button + Make Product Thumbnails Clickable
- how to get rid of header banner buttons on child themes [closed]
- How to change wordpress registration form submit button value?
- Tried everything but Facebook share button won’t load the post thumbnail
- Button generate a random URL [closed]
- Rename woocommerce button [closed]
- Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
- How can i add a random redirect button in wordpress? [closed]
- Can I turn an image into a button?
- Dynamic price for payment button
- How to use tag in wordpress?
- Add a custom code with custom link after add to cart for every product
- Download button under all images WordPress
- How can I make one button a different color from the other buttons on my site?
- How to change the text of Publish Button
- Gutenberg element Button How do I customize the hover and focus effects?