WordPress.org

Ready to get started?Download WordPress

Forums

Dinky
[resolved] Social buttons link to a new tab (5 posts)

  1. gmnikolis
    Member
    Posted 9 months ago #

    At the moment if somebody press the social media buttons
    leave my website...How can i change that so when they click, facebook etc.
    opens in a new tab.

    P.s Thank you for the nice and clean template!

  2. esmi
    Forum Moderator
    Posted 9 months ago #

    Please do not open links in new tabs or windows without warning the user in clear text on the page. This kind of site behaviour breaks the broser Back button & can leave some user groups stranded on the new tab with absolutely no way of getting back to your site.

    If your site contains decent content, your visitors will either may their way back to your site or will open links in new tabs using their controls in their own browsers.

  3. gmnikolis
    Member
    Posted 9 months ago #

    You are right but my client doesn t like this...

  4. Misam Saki
    Member
    Theme Author

    Posted 9 months ago #

    add target="_blank" to links.

    In social.php file find this below code and others:
    <?php if (dinky_get_theme_option('social_mail') != ''): ?><li><a class="social_round-email" href="<?php echo 'mailto:' . dinky_get_theme_option('social_mail') ?>" title="<?php _e('E-mail','dinky'); ?>"></a></li><?php endif; ?>

    Then replace those by this:
    <?php if (dinky_get_theme_option('social_mail') != ''): ?><li><a target="_blank" class="social_round-email" href="<?php echo 'mailto:' . dinky_get_theme_option('social_mail') ?>" title="<?php _e('E-mail','dinky'); ?>"></a></li><?php endif; ?>

  5. gmnikolis
    Member
    Posted 9 months ago #

    thank you!

Reply

You must log in to post.

About this Theme

About this Topic