• Hello,

    I was wondering if anyone knows of a Plugin that would give me the ability to add images to my Tag Pages or maybe a CODE I can add in the description input area?

    I can simply upload the the images to media library, and past the Image URL/Code into the description. That would be fine.

    • This topic was modified 3 years, 6 months ago by Jan Dembowski.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Add this to your theme’s functions.php, preferably that of a child theme:

    add_filter('wp_kses_allowed_html', function  ( $allow ) {
      if ( is_admin()) $allow['img'] = ['src' => true, 'alt'=> true, 'width'=> true, 'height'=> true,];
      return $allow;
    });

    This allows img tags into almost any back end field that accepts HTML. Finer control might be possible by using this code within an action callback. To what action I’m unsure.

    Thread Starter celebblogger

    (@celebblogger)

    Thank you!!!!!! Can the image title be added as well?

    Moderator bcworkz

    (@bcworkz)

    Sure, add 'title'=> true, to the end of the list, between true, and ];

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured Images in Tag Pages or Image Code in description area.’ is closed to new replies.