Social buttons link

  • Author
    Posts
  • #34867
    Ippolit

    Hi,

    First off, great theme!
    I am in a small dilemma here though, regarding the linking of the social pages. For a different site, I have used the following links in order to get the URL and Title of the page when sharing:
    Some text
    (I naturally tried using simply this bit: https://www.facebook.com/sharer/sharer.php?u=’+encodeURIComponent(document.URL)+’&t=’+encodeURIComponent(document.URL));return false – but to no avail.)

    The problem is that I for some reason cannot do this when pasting the links into the Social Media Settings. I have no clue why, but I suspect it’s because no js is supported? and the links are redone so that space is translated into %20, etc.?

    If so, how would I be able to change that (or perhaps use other parameters)?

    Thank you,
    Ippolit.

    #34868
    Ippolit

    Ok, sorry for a double post, but I didn’t realise that links would be automatically changed, so to be sure, this is the code:
    <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com&t=" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(document.URL)+'&t='+encodeURIComponent(document.URL));return false">some text</a>

    #34907
    Zed
    Cryout Creations mastermind

    Social links are filtered using WordPress’ wp_kses filter, so links using JS would get filtered out.

    The Social links are not designed to be used in that way. You can add sharing buttons for sharing your content.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #34924
    Ippolit

    Thanks,
    I like to keep it clean, and sharing plugins are everything but clean (and they clog on the resources).
    I’ll have to think of a different solution 🙂

    Thanks again, great theme!

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Social buttons link’ is closed to new replies.