Ready to get started?Download WordPress


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

  1. sponge.nika
    Posted 11 months 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 11 months 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.


You must log in to post.

About this Plugin

About this Topic


No tags yet.