Title: Button not linking
Last modified: May 12, 2017

---

# Button not linking

 *  Resolved [girdy74](https://wordpress.org/support/users/girdy74/)
 * (@girdy74)
 * [9 years ago](https://wordpress.org/support/topic/button-not-linking/)
 * I’m having some issues with the button link not working. If I change it from 
   window.location.href to location.href it works.
 * Thoughts?
 * thank you!!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [girdy74](https://wordpress.org/support/users/girdy74/)
 * (@girdy74)
 * [9 years ago](https://wordpress.org/support/topic/button-not-linking/#post-9126071)
 * I tried changing this within the core files of the plugin (just to test) but 
   that didn’t work either.
 *  Thread Starter [girdy74](https://wordpress.org/support/users/girdy74/)
 * (@girdy74)
 * [9 years ago](https://wordpress.org/support/topic/button-not-linking/#post-9126096)
 * I know this isn’t what should be done but this is what I did to get the button
   to link to the URL provided.
    File: image-widget-deluxe.php Line 227 //Button.
 *     ```
       // Button.
       			if ( $field == $widget_id . '-button' && ! empty( $url ) && ! empty( $button ) || $field === 'no-sort' && ! empty( $url ) && ! empty( $button ) ) :
   
       				if ( empty($url_target) ) {
       					$link = $url;
       					$target = "_self";
       				} else {
       					$link = $url;
       					$target = "_blank";
       				}
   
       				echo '<p class="rommeled_widget_image-field rommeled_widget_image-button"><a target="'. $target .'" href="'. $link .'"><button class="button btn">' . $button . '</button></p>';
   
       			endif;
       		}
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Button not linking’ is closed to new replies.

 * ![](https://ps.w.org/image-widget-deluxe/assets/icon-256x256.png?rev=1238740)
 * [Image Widget Deluxe](https://wordpress.org/plugins/image-widget-deluxe/)
 * [Support Threads](https://wordpress.org/support/plugin/image-widget-deluxe/)
 * [Active Topics](https://wordpress.org/support/plugin/image-widget-deluxe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-widget-deluxe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-widget-deluxe/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [girdy74](https://wordpress.org/support/users/girdy74/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/button-not-linking/#post-9126096)
 * Status: resolved