WordPress HowTo

How-to guide for WordPress

  • Home
  • Plugins
  • Themes
  • Contact
    • Privacy Policy
  • About

How to Center a Tweet in WordPress

Twitter is a popular social media where we can share content and interact with users. If you are running a website on WordPress like me, you should know how important social sharing is to the success of a business. Twitter allows you to embed Tweets into your site, so you can share what’s happening on Twitter with your visitors. But how do you align it? In this article, I will show you how to center a Tweet in WordPress.

How to Center a Tweet in WordPress

1. Go to Twitter, select the Tweet that you wish to embed and click Embed Tweet.

screenshot showing the embed tweet menu on twitter

For WordPress, you could easily copy the link to the Tweet and insert into a page to embed it. But that way you won’t be able to center it. So we are going to use the full embed code.

2. Copy the embed code.

screenshot showing how to copy the tweet embed code from twitter

3. Create a new WordPress page or edit one and paste the embed code into the text editor.

screenshot showing how to embed a tweet in wordpress

4. By default, you will notice a class attribute in the embed code: class=”twitter-tweet”. Just edit the class attribute and add this class to it: tw-align-center. So your final class attribute should look like the following:

class="twitter-tweet tw-align-center"

5. That’s it. Now update the page and you should see the Tweet centered on the frontend of your website.

screenshot showing how to center a tweet in wordpress

Related

Written by Noor Alam · Categorized: wordpress

Comments

  1. itunes gratis says

    Un buen articulo.

    Reply
  2. Jack Flowers says

    Thank you, any way to embed a tweet in wrapped format?

    Reply
  3. golden seo says

    nice and superb

    Reply
  4. Jason says

    Thank you very much for your help, it worked!
    Just replaced
    class=”twitter-tweet”
    to
    class=”twitter-tweet tw-align-center”
    and it worked like a charm!
    Thank you for sharing the tip!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search WP HowTo

Recent Posts

  • How to Add a Reply-To Address in the Gmail SMTP WordPress Plugin
  • What Does a Security Challenge Mean on PayPal?
  • WP PayPal Button Integration with Contact Form 7
  • Can People See Your Address on PayPal?
  • Mailchimp Integration for WP PayPal Plugin
  • How to Show a Text Box at WP PayPal Checkout to Collect Custom Data from Buyers
  • How to Add a Recurring Price Field to a PayPal Subscription Button
  • How to Add a Quantity Field to a PayPal Button
  • How to Configure Product Variations in WP PayPal
  • How to Make Your WooCommerce Add to Cart Buttons Bigger

Featured Add-ons

Buy Now Custom Amount for PayPal

Buy Now Discount for PayPal

Contact Form 7 Integration for PayPal

Custom Input for PayPal

Mailchimp Integration for PayPal

Product Variations for PayPal

Variable Quantity for PayPal

Variable Subscription for PayPal

Copyright © 2023 · WordPress HowTo

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAcceptRead More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT