Two years in the past, Twitter launched Twitter Anyplace API which made it very easy for us to say twitter usernames and have them be robotically linked to the best profile. It additionally allowed for stunning hovercards with more information. Sadly Twitter has determined to retire the Anyplace API on December sixth, 2012. Since we repeatedly point out person’s twitter handles in our submit content material, it solely made sense to provide you with a option to robotically hyperlink twitter usernames in WordPress. As a substitute of counting on a third-party script, we determined to write down a brief and easy plugin to maintain the job. On this article, we’ll present you robotically hyperlink twitter usernames in WordPress once you point out it after the @ signal like so: @GyanHi.
All it’s important to do is open a clean .php file and name it wpb-twitlinks.php. Then copy the code beneath and put it aside in there. Add the file into your plugins folder, and easily activate the plugin.
Word, since we solely use this on our single submit and pages, we solely have the filter for the_content. You possibly can all the time lengthen this function to excerpts as effectively by including the next line:
We aren’t saying that that is the one methodology that exists. There most likely are bunch of jQuery options obtainable. That is the quickest and best resolution in our opinion.
You May Also Like : What To Do When You Are Locked Out of WordPress Admin (wp-admin)
If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.