echo or return? [duplicate]

Functions can only return one value. Change all the echo statements in your tweet function to concatenate a string, then return the string at the end of the function.

How can I make the Twitter Tools plugin hyperlink every link?

Never used this plugin. WordPress has a function called make_clickable() which might help you. Example: $string = “This is a long text that contains some links like http://www.wordpress.org and http://www.wordpress.com .”; echo make_clickable($string); Output: This is a long text that contains some links like <a href=”http://www.wordpress.org” rel=”nofollow”>http://www.wordpress.org</a> and <a href=”http://www.wordpress.com” rel=”nofollow”>http://www.wordpress.com</a> .

How to keep sharing stats after creating 301 redirects?

Got it. I was already using the Advanced Custom Fields plugin so I just created a custom field called “old_url” with that. Then I created a function: function sharingurl () { if(get_field(‘old_url’) == “”) { echo untrailingslashit(get_permalink()); } else { echo get_field(‘old_url’); } } Then I just included <?php sharingurl(); ?> in the data-href and … Read more