WordPress.org

Ready to get started?Download WordPress

Forums

Image Widget
What's the easiest way to add a link to the title using the widget.php template? (4 posts)

  1. Joey
    Member
    Posted 1 year ago #

    I'm not exactly well versed in PHP so can anyone outline how to edit the widget.php theme file to create a link in the title? I simply want the same link defined for the image to apply to the title as well.

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

  2. Joey
    Member
    Posted 1 year ago #

    Can anyone offer any assistance on this? I'm stuck. :-(

  3. javiandgo
    Member
    Posted 1 year ago #

    Into widget.php on line 12

    if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }

    Change this line

    if ( !empty( $title ) ) { echo $before_title . '<a href="'.$link.'" target="'.$linktarget.'">' . $title . '</a>' . $after_title; }

    the title take the link of the image

  4. Joey
    Member
    Posted 1 year ago #

    Wonderful! Thank you so much. It works perfectly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic