WordPress.org

Ready to get started?Download WordPress

Forums

WP Bannerize
image size and layout (2 posts)

  1. ibaan
    Member
    Posted 3 years ago #

    Hi there,

    I am looking for the code where I can edit the image size and other layout options.
    Anyone knows?

    Thanks,

  2. Jonáš Jančařík
    Member
    Posted 3 years ago #

    Check out wp-bannerize_frontend.php in the plugin folder, lines 140 and 141.

    For example, I wanted to change the width of the pictures to 100%, so I commented out line 140 (which apparently gathers image's dimensions from the database) and edited line 141 (added STYLE attribute), like this:

    //$imgsize = ($row->width == 0 || $row->height == 0) ? '' : sprintf('width="%s" height="%s"', $row->width, $row->height );
    
    $o .= '<a' . $nofollow . $javascriptClickCounter . $new_link_class . ' ' . $target . ' href="' . $row->url . '"><img ' . $imgsize . ' style="width: 100%;" alt="' . $row->description . '" src="' . $row->filename . '" />';

    (Obviously, the ' . $imgsize . ' part could now be left out.)

    There is also the wp-bannerize_widget.php file, which should probably be updated too if you use the plugin as a widget.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic