[Support request] Click to Tweet box

Home Forums Support Click to Tweet box

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1331973

    I found this old thread and have found it works well to allow me to replace the Better Click to Tweet plugin.
    I have altered the code slightly to resemble the output of the previous plugin. I would like to be able to use the shortlink instead of full URL. I am unfortunately not down with js coding at the level required.
    I know this is probably outside of GP related support directly but would you be able to suggest how I need to change this code to get the shortlink instead?

    	// Tweet blockquote	
    		var quote = $(this);
    		quote.append( '<a target="_blank" href="https://twitter.com/intent/tweet?url=' + window.location.href  + '&text=' + quote.text() + '&via=@YOURHANDLE&related=@YOURHANDLE" class="twitter-share-button icon-twitter" data-text="' + quote.text() + '" data-lang="en">Tweet this</a>' );
    Lead Developer
    Lead Developer

    Hi there,

    I’m afraid this is something I’ve never played with. It may be worth asking over on https://stackoverflow.com/.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.