Use Images in Tag Page description
-
Hello Alexander (please sorry about my bad English)
I need to insert images in the TAG description. Unfortunately, when I insert an image, Worpdress transforms the HTML code like this:
<img src=\"https://dev.mysite.com/wp-content/uploads/2023/04/my-image.jpg\" alt=\"my image\" width=\"750\" height=\"419\" />I googled for a whole day for possible solutions and found various codes to add to the functions.php file
I used the code suggested by WooCoomerce here https://woocommerce.com/document/allow-html-in-term-category-tag-descriptions/
I also tried this code
add_filter('wp_kses_allowed_html', function ( $allow ) { if ( is_admin()) $allow['img'] = ['src' => true, 'alt'=> true, 'width'=> true, 'height'=> true,]; return $allow; });Or this:
remove_filter('pre_user_description', 'wp_filter_kses'); remove_filter('pre_term_description', 'wp_filter_kses'); remove_filter( 'pre_link_notes', 'wp_filter_kses' ); remove_filter( 'term_description', 'wp_kses_data' );But nothing works. Is there any way to add images in the TAG description? Maybe it’s possible to do it with the pro version of the theme?
Kind regards and sorry again for my bad English.
The topic ‘Use Images in Tag Page description’ is closed to new replies.

