Simple Image Widget
[resolved] How to change the represnation of html? (2 posts)

  1. sponge.nika
    Posted 1 year ago #

    How can I hichack the style of represnation of wiget. I want ot show image then title then the text and add my own classes and tags.


  2. Brady Vercher
    Plugin Author

    Posted 1 year ago #

    To change the widget output, you'll need to use a filter and generate your own HTML. Here's the filter:

    function prefix_simple_image_widget_output( $output, $args, $instance, $id ) {
        // Generate your HTML here and assign it to $output
        return $output;
    add_filter( 'simple_image_widget_output', 'simple_image_widget_output', 10, 4 );

    You can copy the output from the widget to modify as you like; it's located here. Lines 121-128 aren't necessary since they're for an older version of the widget.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Image Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.