Image Widget
Image Link - Beyond Image (4 posts)

  1. pixelmasher
    Posted 5 years ago #

    So I was wondering how you could get the hotlink on the image to only be the image. The link seems to show up in the whole widget, not just the image.


    Thanks for any assistance on this.


  2. Peter Chester
    Modern Tribe
    Plugin Author

    Posted 5 years ago #

    you can override the widget template in your theme.

    from the readme:

    The Image Widget comes with a default template for the widget output. If you would like to alter the widget display code, create a new folder called "image-widget" in your template directory and copy over the "views/widget.php" file.

    Edit the new file to your hearts content. Please do not edit the one in the plugin folder as that will cause conflicts when you update the plugin to the latest release.

  3. sarah3585
    Posted 5 years ago #

    Just the info I was looking for, is there a way of targetting this new location for a certain widgets only?

    I've moved the h3 below the image and linked it for a layout of one widget but as default I still want it to use the standard location file.

  4. neil@gufc.org
    Posted 4 years ago #

    Can anyone give me the code to remove the "hot link" around the image. I believe the portion that needs to be changed is:
    if ( $imageurl ) {
    echo "<img src=\"{$imageurl}\" style=\"";
    if ( !empty( $width ) && is_numeric( $width ) ) {
    echo "max-width: {$width}px;";
    if ( !empty( $height ) && is_numeric( $height ) ) {
    echo "max-height: {$height}px;";
    echo "\"";
    if ( !empty( $align ) && $align != 'none' ) {
    echo " class=\"align{$align}\"";
    if ( !empty( $alt ) ) {
    echo " alt=\"{$alt}\"";
    } else {
    echo " alt=\"{$title}\"";
    echo " />";

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic