The only filter available is wp_dropdown_cats, which allows you to filter the entire HTML select string and that means trying to string-match markup. That is always a bit questionable. Still…
function dropdown_data_attr_wpse_213033($output){
return str_replace('<select','<select data-live-search="true"',$output);
}
add_filter('wp_dropdown_cats','dropdown_data_attr_wpse_213033');
wp_dropdown_categories(); // test
Related Posts:
- Add multiple custom fields to the general settings page
- When should you, and when should you not, use wp_list_pluck()?
- Is it possible to remove the “standard” post format?
- Woocommerce add to simple product attribute programmatically [closed]
- Issue with get_theme_mod returning a blank value instead of the saved value
- How to remove row-actions from pages table?
- Modify search function in WordPress (TwentyTwelve)
- How to customize search result page title?
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- How to fix a theme with page.php Default Template that accidentally deleted?
- How do I change parameters without changing the core
- Problem with extract() with custom shortcode
- add sidebar area to header of child theme
- Custom function for user register in wp?
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- How to Add a Random Custom Gravatar in the WordPress Comments?
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- How to mass-delete inline styles in WordPress custom post type automatically?
- Remove the deleted users avatar from list
- Customizer field value into functions.php variable
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- str_replace function in theme
- Automatically wrap multiple images in div
- Ajax not working properly
- Include default functions and methods
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- How can I modify all existing tags while keeping the urls themselves?
- Best practices regarding the creation of custom widgets?
- Unable to login using username
- Word Press – Dynamic Content [closed]
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- different style sheet for just one page template
- Condition OR for current user ID
- How to retrieve the current post’s generated featured image size?
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Where do I store custom functions that call custom page template files?
- Why There Is No “get content by ID” Function
- Wp-query Order By problem
- Randomizing wp_tag_cloud() in child theme
- login_headertitle is deprecated since version 5.2.0
- Where do I go to edit this area? [closed]
- Replace plugin function with a custom function?
- Add attribute only to first image of every post via functions.php
- Different favicon on different pages
- The_content and Preg_replace in loaded Iframe [closed]
- Problem with images URL after filter applying
- two search forms on the same page
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- how to display a page before the home page
- loginout function customization
- Function to check if custom page is used by page?
- implementing a centralized content “show-do-not-show” toggle?
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- How to remove font awesome from loading in wp theme
- Header menu aligned right on all pages except for single-post page [closed]
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Modifying a WordPress Plugin
- CF7 select value get to function and reciept value from function
- Hide author info in single posts by certain users
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- Shortcode to insert default text and change one word throughout it?
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- Woocommerce custom calculation function
- Remove all video attachment, both files and post/postmeta from database?
- WordPress Ajaxifying not working properly
- WordPress function with attribute pass to template
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Replace image attributes for lazyload plugin on image elements with specific class
- Adding A New Widget to WordPress Disables the Existing Widgets
- Help! Need a different logo on my main page from my other pages
- Display page number on custom page title function
- How to make an If Else on Excerpt Filter
- How to replace words in my posts and saved new words
- How do I integrate my Child Theme into a Custom Template?
- Shortcode to eliminate and replace with
- Add functionality to post editor
- custom post with loading script per single post
- functions.php / replacing div’s with new ones?
- Why does modifying my functions.php file always result in a server error
- Post variables not displaying correctly in custom function
- Remove snippets of JS from core
- Removing Facebook contact field from user contact not working
- Explode Array from Repeatable Custom Field
- WordPress Custom wp mail template return full template
- How to crop image in WordPress with aspect ratio for any size of image
- post_row_actions filter from parent theme not executing in child theme
- Customizer cuistom CSS Priority ordre Issue
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- BuddyPress Edit activity function good practice
- wp_login_form display no styled form
- Advanced Custom Fields in WP_Query: Clickable Text in List Format
- Add custom css to specific user