FrankB80
Forum Replies Created
-
Forum: Plugins
In reply to: [Genesis Simple Share] Customize shared title/text and linkHi Nick,
I was afraid that would be the answer.
So the same is true for using a custom field for the text, I guess, right?
Anyways, thanks a lot for your feedback!
Best, Frank
Forum: Plugins
In reply to: [Genesis Simple Share] Customize shared title/text and linkI found this code to make bitly URLs: https://www.wpbeginner.com/wp-tutorials/how-to-automatically-shorten-your-wordpress-urls-with-bit-ly/
Now I’ve seen this in front-end.php:
$buttons[] = sprintf( '<div class="%s" id="%s" data-url="%s" data-urlalt="%s" data-text="%s" data-title="%s"></div>', $icon, $div_id, get_permalink( $id ), wp_get_shortlink( $id ), $description, $data_title );
But still don’t really know how to replace the link and title if not editing this directly in the plugin file which I know I should avoid…
Will take a look at it, thanks a lot!
Oh, I see… that might be a showstopper then.
Forum: Plugins
In reply to: [Genesis Simple Share] How to append the Twitter username?Yes, after your description I found it right away, thanks!
Forum: Plugins
In reply to: [Genesis Simple Share] How to append the Twitter username?Hi Nick, how was I not able to see this? ??
Sorry…
Forum: Plugins
In reply to: [Genesis Simple Share] How to append the Twitter username?Shouldn’t this actually work out of the box using author profile’s Twitter username?
Forum: Plugins
In reply to: [AddToAny Share Buttons] how to use wordpress default shortlink for sharingThanks, got this to work.
Now appending UTM parameters, then creating a bit.ly shortlink. Example:
var a2a_config = a2a_config || {}; a2a_config.callbacks.push({ share: function(share_data) { // Parameters var params = '?utm_source=source&utm_medium=medium'; // The shared URL var old_url = share_data.url; // Initialize new shared URL var new_url = old_url; // Add parameters if not already added to the shared URL if ( old_url.indexOf(params, old_url.length - params.length) === -1 ) { new_url = old_url + params; } // Modify the share by returning an object // with a "url" property containing the new URL if (new_url != old_url) { return { url: new_url }; } } }); a2a_config.track_links = 'bitly'; a2a_config.track_links_key = 'addtoany|R_cc6a4017b0274d1d86f2397771b70136'; a2a_config.templates = { twitter: "${title} ${link} via @twitter-username" };
But this means my bit.ly credentials are now accessible (in the example it’s from addtoany)…
Any chance you could show how to do this via functions.php instead? Or should I open a new question/thread for this?
Thanks a lot for your support!
Forum: Plugins
In reply to: [AddToAny Share Buttons] how to use wordpress default shortlink for sharingSame question here.
And beyond… as I would like to attach custom UTM parameters to the link and then make a shortlink out of it, but that might be a second step (if possible).
Forum: Plugins
In reply to: [AddToAny Share Buttons] Twitter messageIs it possible to do this via functions.php as well?