Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP code help please

Featured Replies

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

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; ?>
  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.