Categories: WordPress

WordPress Twitip ID Light Reloaded

Now that I am a twitterer I have decided to integrate Twitter into my WordPress theme. I decided to install WP-Twitip-ID which adds a form field to your comments template, stores the twitter id that is entered and then displays the corresponding twitter ID within the comments.

Image provided by Shutterstock

Why change it?

While this is an excellent script I didn’t need all of the functions. By trimming the plugin, creating the twitter ID form field manually and adding 1 simple function to my theme I have removed unnecessary code.

Download & Install Plugin

Download the plugin found. Install it in your plugins folder in wp-content or use the admin upload tool. Activate the plugin.

Edit Comments Template

In comments.php look for a line beginning with the following. It may look slightly different.










Now you want to enter the form field for the twitter id. I entered mine underneath the URL field keeping to the same style as the previous fields.




Now you want to add the function that will insert the user’s twitter id with their comment. Now look for the similar in your comments.php. If you cant find it in that file check functions.php as you might have custom comments.





As you can see in my comments section the twitter id is below the date, which is line 3 in the above code. Visualise where you would like your twitter id to be displayed within your theme and enter the following.


The only thing now left for you to do is style your form field using the following id within your stylesheet. You may have the form id elements #author,#email and #url already defined and styled in your stylesheet. Just add #atf_twitter_id to make them all the same.

#author, #email, #url, #atf_twitter_id
 {
   height:30px;
   margin-bottom:15px;
}

If you want to style the @twitter id output then use the following class.

.twitter{}

I hope you have found this tutorial straightforward. Please let me know if you have any troubles

Share
Published by
Tracy Ridge

Recent Posts

Hot New Web Dev – October 2024

Welcome to Hot Web Dev October 2024, featuring the latest technology and web development news.… Read More

3 weeks ago

New Svelte 5 Guessing Game 2024

In this tutorial, you’ll build a fun and interactive guessing game using Svelte 5, the… Read More

2 months ago

Hot New Web Dev – September 2024

Welcome to Hot Web Dev September 2024, featuring the latest technology and web development news.… Read More

2 months ago

New JavaScript Guessing Game 2024

The JavaScript guessing game tutorial is a simple beginner's project. It features modern JavaScript syntax… Read More

2 months ago

Hot Web Dev – 12 Useful Top Tools of 2023

If you have been following the monthly Hot Web Dev magazine you will find the… Read More

2 months ago

Hot New Web Dev – August 2024

Welcome to Hot Web Dev August 2024, featuring the latest technology and web development news.… Read More

3 months ago