The str_replace()
function should have 3 parameters, so your code should be like this:
echo str_replace(
'class="fa fa-play mi"',
'class="fa fa-play mi" aria-hidden="true"',
'<i class="fa fa-play mi"></i>'
);
Related Posts:
- How to call a function only once (global variable scope)
- Multiple is_page() in page.php
- Fatal error: Call to undefined function plugin_dir_path()
- Switching wp_get_sites to get_sites
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- How to correct schedule my event weekly with wp_schedule_event()
- One button to change all settings in theme customizer?
- Add custom image sizes to media uploader
- Execute a shortcode when clicking on a image
- How can update custom meta for all posts
- Is $hook a global variable in WordPress
- wrong php date()?
- Include a php file from functions.php only to homepage
- How do I fetch all comments per post via WP REST API?
- Shortcode content output but not in correct place
- How to restrict page access to logged-in users?
- How do I display a user’s previous orders as a select box option on a product?
- Handling Body class based on Template
- How to combine wordpress_logged_in cookies in one cookie?
- Two Different Links for Same Product – WooCommerce [closed]
- Automatically adding new post categories to menu
- Get post id in a function when edit/add a post
- get author_name from queried post
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Pass php dynamic variable to shortcode
- Modify custom field input data before creating a new post
- Query Pages and post excerpts dynamically
- Is there a way to conditionally check whether a WordPress post title is empty?
- Get my site session in wordpress?
- is_user_logged_in() not working in AJAX validation call
- Register a menu – Error Header
- Shortcode to find and replace URL
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Add product to cart for user – WC()->cart->add_to_cart [closed]
- How to create a field in customize and show that in header.php?
- Set site title & tagline with wp.config or function.php
- Shortcode to embed Edit Account form not working
- How to make jquery count down timer function manually editable
- Hierarchical taxonomy list with modificated term links
- Add value to new attribute inside WordPress menu items
- Please show me how to use an if/else statement in combination with wp_enqueue
- iframe not showing in content on blog page
- Get user custom field value on function.php
- entire JS folder not loading in a WP theme
- Get the name of menu item with wp_nav_menu
- Else/If Statement to Display Photo Descriptions
- PHP Output also in Child theme, but different
- Dynamically Generate Functions and Hooks
- Strip from or something better?
- Display additional page templates and a sidebar on plugin activation
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- Need help for some PHP code
- Add a Metabox checkbox to the Page Edit screen of wp-admin , which only certain roles can see and Makes only certain roles able to Edit said page
- Adding HTML Code to Replace Text in PHP
- how to replace h1 entry title with h2 in category pages only
- How to unset a function from a action inside a class, that is called in another class
- Create a new account on site B with data from the purchase of site A
- Why is the current page loaded in the pop-up window and not the specified one?
- if get_post_meta is empty echo a placeholder or shortcode
- File from parent theme imported to child theme doesn’t work – any ideas?
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- register_block_type is not working properly
- PHP “warning include_once(): Failed to open stream” Simple HTML DOM in WordPress Child Theme
- cURL needing to loop through all “next_page”
- Woocommerce – if selected attribute term equals
- split 1 cart item into instock and back ordered
- post_exists stops working in a scheduled event
- Access WP files on “server 1”, from “server 2” – using wp-load on an external website
- Where do I implement this display of User Meta Data, and how to put it in a table?
- How can I get my pagination loop to display the correct number of total pages?
- Get posts by id using shortcode
- Is it possible to replace ‘attachment’ with another word?
- Add ID to output only for first option
- Show post/page into div using function
- PHP get_category() function redeclared
- How to trim content AND retain HTML?
- Display posts using post ID’s in an array
- Issue encountered while trying to keep website private
- Popular Post Not Show
- How to make 2 similar functions more efficient
- wp_delete_comment is doing nothing
- Custom meta box save values issues – Deprecated: Function ereg() and more
- WordPress – registering sidebar and adding a button directly after .textwidget
- Ninja Forms – pull in some post related information
- Functions are causing errors
- WordPress adding in site URL to header links
- Adding code to the function file
- Error on Include php:/usr/share/pear
- Global variables and re-use
- My title is showing after the shortcode
- Load a Header in wordpress
- Trouble figuring out how to get my button to submit comment
- Adding multiple conditional tags in a function?
- How do I change the Go To Categories link in the term_updated_messages
- WooCommerce – Show ‘Sales’ badge on variable products where only some variations have sales price [closed]
- Understanding responsive imagery
- How to get meta box labels?
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Background Tasks in a WP Cronjob?
- Tags being Inserted in html from plugin PHP not passing through the_content