Comments 1Angela started the conversationMarch 21, 2015 at 2:09pmHi Djwd,I want to make the Single Ad Widget open URL's in new windows to keep people on my website. Can you please instruct me how I can go about doing so?Thanks 93 djwd repliedMarch 23, 2015 at 3:01pmHi there,if you're using an Ad code such as AdSense it's something you should check with the banner code itself or the provider. I can only help if you're using a fixed image, is that the case?RegardsdjwdRegardsdjwd 1Angela repliedMarch 24, 2015 at 12:38amHi Djwd,Yeah I forgot to mention, its fixed image I am using in the Single Ad WidgetThanks 93 djwd repliedMarch 25, 2015 at 2:12pmHi,hence this is more HTML related rather than the theme, you need to add the target attribute to the a tag, as such:<a href="google.it" target="_blank">Hope it helpsRegardsdjwdRegardsdjwd 1Angela repliedMarch 28, 2015 at 4:37pmI am using the automated image entering in the Ad Widget. Please see screenshot 93 djwd repliedMarch 30, 2015 at 1:11pmAlright, then you'd need to edit the template file directly. Located in inc/widgets/wg-sidebar.php line 326<a href="<?php echo esc_url( $href ); ?>"><img src="<?php echo $image; ?>" alt="<?php echo esc_attr( $alt ); ?>" /></a>become:<a href="<?php echo esc_url( $href ); ?>"><img src="<?php echo $image; ?>" alt="<?php echo esc_attr( $alt ); ?>" target="_blank" /></a>Hope it helpsRegardsdjwdRegardsdjwd 1Angela repliedMarch 30, 2015 at 7:06pmThanks djwd Sign in to reply ...
Hi Djwd,
I want to make the Single Ad Widget open URL's in new windows to keep people on my website. Can you please instruct me how I can go about doing so?
Thanks
Hi there,
if you're using an Ad code such as AdSense it's something you should check with the banner code itself or the provider. I can only help if you're using a fixed image, is that the case?
Regards
djwd
Regards
djwd
Hi Djwd,
Yeah I forgot to mention, its fixed image I am using in the Single Ad Widget
Thanks
Hi,
hence this is more HTML related rather than the theme, you need to add the target attribute to the a tag, as such:
Hope it helps
Regards
djwd
Regards
djwd
I am using the automated image entering in the Ad Widget. Please see screenshot
Alright, then you'd need to edit the template file directly. Located in inc/widgets/wg-sidebar.php line 326
become:
Hope it helps
Regards
djwd
Regards
djwd
Thanks djwd