• Resolved nataliemin

    (@nataliemin)


    I am working on a directory containing addresses, and I want to add social media links for each address in the directory.

    I would like to do this by including clickable icons with links to the URL of, eg, the relevant Facebook or Twitter page for that address. I would like this to open on a new tab.

    I have managed to do all of this by uploading social media icon images to the WP Media file and inserting custom links on the drop-down menu. The only thing I cannot do is get the links to open in a new tab.

    See example at this link:
    https://credituniondirectory.co.uk/credit-unions-in-derbyshire/

    Is there any way to do this? I’ve searched plugins but can’t find any that will allow me to do this – maybe I’m using the wrong search terms. Does anyone know of a way to do this, or of a relevant plugin that would help me?

    There are lots of plugins to insert social media “follow me” icons, but I couldn’t find any that would help me link to many different social media pages.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’d probably toggle to the “Text” editor so you can edit the HTML for the icons. Easy & fast and doesn’t require any plugins or anything.

    One of the codes for the icons is:
    <a href="https://www.facebook.com/CNEDCU"><img class="alignnone wp-image-223" src="https://credituniondirectory.co.uk/wp-content/uploads/2015/07/Facebook-icon.png" alt="Facebook icon" width="37" height="37" /></a>

    Just put target=”_blank” right after that first a and you should be set:
    <a target="_blank" href="https://www.facebook.com/CNEDCU"><img class="alignnone wp-image-223" src="https://credituniondirectory.co.uk/wp-content/uploads/2015/07/Facebook-icon.png" alt="Facebook icon" width="37" height="37" /></a>

    Repeat for the other one and you’re done!

    Thread Starter nataliemin

    (@nataliemin)

    Wow – it works perfectly! I need to learn to code.

    Thankyou so much 2ysub2ysur!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I get custom image links to open in a new tab?’ is closed to new replies.