• Resolved recstudios

    (@recstudios)


    Hi !

    Is it possible to target the links _blank , so that they open in a new tab..?
    I have links to social pages, but it’s a pity they lead the visitor away from website..
    Thx!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Maeve Lander

    (@enigmaweb)

    There’s not an easy check box for that I’m afraid. Maybe in the future. In the meantime youd have to add it in the plugin.

    Thread Starter recstudios

    (@recstudios)

    All right, thanks for your reply.
    How is it possible to add such options to the plugin..? is it possible to edit it via WP interface ?

    1) Duplicate the entire plugin folder and rename to something else.

    2) Edit the file ‘sticky-side-buttons.php’ and change the Plugin name and version and text domain to something else.

    3) Edit the file ssb-ui.php and change the following:

    Add this after line 122:

    
    <p>
    <input type="checkbox"
    id="button-target-<?php echo $btn_id; ?>"
    name="ssb_buttons[btns][<?php echo $btn_id; ?>][btn_target]"
    <?php if($this->buttons['btns'][ $btn_id ]['btn_target'] == true){ ?> checked="checked"<?php } ?>>
    <label for="button-target-<?php echo $btn_id; ?>"> Open in new tab/window</label>
    </p>
    

    Change line 363 to look like this:

    
    <a href="<?php echo $this->buttons['btns'][ $btn_id ]['btn_link']; ?>"<?php if($this->buttons['btns'][ $btn_id ]['btn_target'] == true){ ?> target="_blank"<?php } ?>><?php
    

    *Note: line 363 is originally on line 357, but gets pushed down from adding to line 122 in the above steps.

    • This reply was modified 7 years, 3 months ago by cawoodmarketing. Reason: re-ordered steps
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Target _’ is closed to new replies.