Custom Image Widget

Home Support Blog Zone Custom Image Widget

This topic contains 1 reply, has 2 voices, and was last updated by  methoewsf 1 week, 4 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #19998


    I need to create an image widget which is similar to the wordpress media image widget, defined in the wordpress core in wp-includes/widgets/class-wp-widget-media-image.php. I only need a couple minor differences:

    Remove the inline style which is hard-coded into the $image_attributes array as ‘style’ => ‘max-width: 100%; height: auto;’,
    No title should appear on the front end even if one is entered on the backend.
    I searched for filter hooks that would allow me to set these widget properties but found nothing useful. I even tried copying the source code for the WordPress image widget and modifying to create the desired widget. However, I was not able to change the frontend title output. Can anyone describe the correct way to go about creating this widget?



    yes, it is very easy. You can checkout my website i also add same thing :

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.