Lunar social media icons open within website


(Lydia) #1

Hi I would like the social media icons to open their respective platforms outside of the website (in their own window) when clicked. At the moment when clicked my website disappears when the social platform opens.

Do I need to add more code to have this happen or is there a setting somewhere I’m not looking.

One of the 4 sets codes (1 for each social media platform) I have reads like this:

Love to have some help with this.
Thanks in advance.
L


(Joe Martin) #2

Depends on what stack you are using…look at this page…in the menu bar…is this what you are wanting to happen?
http://ibize.com/markz/


(Lydia) #3

Hi Joe, thanks for getting back to me. Im using the Lunar theme that comes with social media icons for the banners. I was able to edit them for colours (under page styles) and which choose ones I am using (using code under the page sidebar). I checked out your site (cool!) and your social icons do open in a new window (I want that functionality) but I don’t intend to have them in the menu bar.
Any ideas?
Thanks
L


(Lydia) #4

HI Joe, I got feedback from Elixir and the short story is cannot be done using the built in icons. I’ll figure something else out since I don’t want potential clients to fall down the Facebook rabbit hole and not get back to my site.
Thanks
L


(Joe Martin) #5

they would be wrong…just edit the code:
<a class=“myBadge twitter” href=“http://twitter.com” target="_new")>


(Lydia) #6

Wow. hmm and I asked them about code. I edited the code to my linked in and posted to test but it still doesn’t open in a new window. Did I edit my code correctly? Please check out my attempt.

FROM:

TO: <a class=“myBadge linkedin” href=“https://www.linkedin.com/in/lydiacharakpsychotherapy/“target=”_new”)>

Thanks for your help.
L


(Adam Shiver) #7

What I believe I said when asked was the following…

If you want to modify the link after upload that is fine, but is not related to the theme itself. You will need to do so though each time you publish your page.

If you want to modify the theme internally then you risk that change being overwritten when an update for the theme is pushed out to users. This is also up to you if that is something you’d like to do, but you will need to make the modification again after any updates to the theme.

Hope that clears things up.


(Adam Shiver) #8

Looks like you may have an errant paren after your target tag.


(Joe Martin) #9

Here is a sample on mint…
http://ibize.com/code/

and it works


(Lydia) #10

Thank you for this. I see what you are saying and I appreciate the follow up. Like a dog on a bone I went ahead and I tried the edited code without the paren and it still opens in the same window. So I think I’m back to the drawing board I think.
Thoughts?
Cheers
L


(Adam Shiver) #11

Are you editing the code in the theme or after publishing?


(Lydia) #12

In the theme in the page sidebar. I have no idea how to do it after publishing.


(Adam Shiver) #13

Ah yes, I do apologize I forgot Lunar uses the cut and paste badges and not the pre-coded badges. My mistake. That’s what happens when you’re trying to go from memory while working on another project.


(Joe Martin) #14

try this:
<a class=“myBadge twitter” href=“http://twitter.com” target=”_new”>
Ensure all the spacing and quotes.


(Lydia) #15

Thanks Joe, I’m still not doing something right. I must be blind in one eye and can’t see out of the other LOL. Could I impose on you to fix my code so I can copy and paste? I would be so appreciative. I plopped my code in below just in case you say yes…
Thanks for your help.

<a class=“myBadge linkedin” href=“https://www.linkedin.com/in/lydiacharakpsychotherapy/” target=”_new”>


(Lydia) #16

No worries, Thanks a bunch! You must do all kinds of multitasking plus fielding tech questions too.
Im still having a go at changing the code to do what I need.
cheers
L


(Joe Martin) #17

Does this help:
10%20AM

The sample page is updated with that code.


(Lydia) #18

Hi Joe, it’s tear hair out time. I swear I’ve done it exactly the same way with no luck. I tried a different browser just in case. I copied your code and carefully swapped out the relevant words.
I’m sorry, I just don’t get why its not working.
Thanks for all your help.
L


(Adam Shiver) #19

The target should be _blank and not _new. Give that a shot.


(Roger Harris) #20

Hi @LCharak… I see Adam spotted the error :slight_smile:
Just in case it helps, here’s a sample I found while reading through this:

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_link_target

It should make sense to you having tried everything here…