Okay
  Public Ticket #1699836
Share buttons
Closed

Comments

  •  2
    ViceAdv started the conversation

    Hi there,

    i'd like to add the share button for whatsapp, like the plugin "AddToAny" does. Is there a way to make it possible, or do I have to deactivate the share option and create it via another plugin? I could add the links via js but it's a dynamic url, so I should have to change it for every page. 

    Thanks in advice.

  • [deleted] replied

    Hi there,

    Sorry but our theme doesn't offer an option to share something in WhatsApp.

    If you're looking for professional help in this matter, there's always someone available for such tasks on the WP Kraken or Codeable. Pricing and timeline are always straightforward there and that's the main reason for recommending those services.

    Thanks for your understanding.

  •  2
    ViceAdv replied

    I found a solution, but in the console it gives me "unexpected identifier"

    the code is the following:

    var htmlString = '<a href="whatsapp://send?text=" title="Share On Whatsapp" onclick="window.open('whatsapp://send?text=%20Take%20a%20look%20at%20this%20awesome%20page%20-%20' + encodeURIComponent(document.URL)); return false;">Whatsapp</a>',      
    div = document.createElement('div'),         
    div1 = document.querySelector('.google-plus');       
    div.innerHTML = htmlString;      
    div1.parentNode.insertBefore(div.firstChild, div1.nextSibling);

    The error is (first line) the ' before whatsapp:// because the code stops at that point, reading it as a closure. Can you help me solving this? I already tried using " but it's the same thing, keep giving error. 

    I would be so grateful if you could fix this. Thanks in advice.

  • [deleted] replied

    Hi there,

    I'm really sorry but this question is out of our support scope as we wrote on our support homepage and on this area.

    If you're looking for professional help in this matter, there's always someone available for such tasks on the WP Kraken or Codeable. Pricing and timeline are always straightforward there and that's the main reason for recommending those services.

    Hope for your understanding.