WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. sponge.nika
    Member
    Posted 10 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.

    http://wordpress.org/plugins/simple-image-widget/

  2. Brady Vercher
    Member
    Plugin Author

    Posted 10 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.