[slide caption url in a new window Posted in : Responsy WP steffonpixelwarsParticipant 19 March 2014 at 10:00 #13085 Hello, I wanted to make a slider with a target=”_blank” link. Is it possible ? Like that for example : [slide caption=”” url=”mylink” target=”_blank” src=”mypic.jpg”] Thank you ! S. Mehmet S.Keymaster 23 March 2014 at 22:50 #13145 Sorry, it not possible. steffonpixelwarsParticipant 24 March 2014 at 10:09 #13159 Hello, yes, it is ! I’ve found this Sunday. I have modified in functions.php : function slide( $atts, $content = null ) { extract( shortcode_atts( array( ‘caption’ => ”, ‘url’ => ”, ‘src’ => ”, ‘target’ => ‘‘), $atts ) ); $caption_out = ”; if ( $caption != ” ) { $caption_out = ” . $caption . ”; } $url_out_begin = ”; $url_out_end = ”; if ( $url != ” ) { $url_out_begin = ‘<a href="' . $url . '" target=”‘ .$target. ‘“>’; $url_out_end = ‘‘; } $slide = ” . $url_out_begin . ” . $caption_out . $url_out_end . ”; return $slide; } add_shortcode( ‘slide’, ‘slide’ ); And then, the code in my first message is ok ! Mehmet S.Keymaster 24 March 2014 at 20:59 #13172 Ok. Good luck. Viewing 4 posts - 1 through 4 (of 4 total) The forum ‘Responsy WP’ is closed to new topics and replies.