Last active
June 18, 2022 10:36
-
-
Save Codevz/9fb2544013b76cca55caff351c9d0519 to your computer and use it in GitHub Desktop.
XTRA WP Theme - Modify HTML of featured image and post format, https://xtratheme.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* With this function you can modify single post featured image including post format HTML data. | |
* | |
* @var $value HTML of featured image and post format. | |
* | |
* @return string | |
*/ | |
function codevz_xtra_single_featured_image( $value ) { | |
return str_repalce( '/>', ' data-unit="25" />', $value ); | |
} | |
add_filter( 'codevz/single/featured_image', 'codevz_xtra_single_featured_image' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to see more actions and hooks of XTRA WP theme, Please check out documentation here https://xtratheme.com/docs/developer/