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

  1. Joey
    Posted 3 years 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.


  2. Joey
    Posted 3 years ago #

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

  3. javiandgo
    Posted 3 years 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
    Posted 3 years ago #

    Wonderful! Thank you so much. It works perfectly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic