September 3, 201313 yr I have the following code which shows a Facebook icon which is is linked to a Facebook page, however I need the URL to open a new tab instead of changing the current page. Is it as simple as adding in target="_blank" and if so where would I place this? <?php if( mfn_opts_get('social-facebook') ): ?><li class="facebook"><a href="<?php mfn_opts_show('social-facebook'); ?>" title="Facebook">F</a></li><?php endif; ?> As usual, any advice on the correct way to do this would be appreciated
September 3, 201313 yr All you have to do is add target="_blank" to the link like so <?php if( mfn_opts_get( 'social-facebook') ): ?> <li class="facebook"> <a href="<?php mfn_opts_show('social-facebook'); ?>" title="Facebook" target="_blank">F</a> </li> <?php endif; ?>
September 3, 201313 yr Author Brilliant, cheers for the quick response - it's that brain freeze time of day and I didn't want to 'practice' as it is a live site! Much appreciated mate
Create an account or sign in to comment