Support » How-To and Troubleshooting » How to center text in text widget?

How to center text in text widget?

  • mirmark



    Newbie WordPress user, newbie html person…I need some help. I’m using WordPress 2013 Theme, and using the “sidebar” (which is actually a footer in this theme) and the text widget. I’d like that text to be centered…tried a simple “center” tag and that didn’t work. Can anyone help? Here’s the site.

    I have created a child page file, per WordPress’s Codex, but don’t know what to do next, or where to find the appropriate code to change.

    Thanks so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jose Castaneda



    One way I can think of would be to modify the footer of the theme rather than using a text widget. The reason I say that is you need to alter the jQuery masonry script to get the desired result.

    In the footer.php file you could try adding something like:

    <div class="contact">Please contact...</div>


    <footer id="colophon">

    And then in your child stylesheet you Could add:

    .contact {
        text-align: center;

    Keep in mind this is untested. 🙂



    Jose, thanks! What happens if I make those changes and WordPress updates the theme? Do I lose the coding in the footer.php file?

    Moderator Jose Castaneda



    You copy and paste the code from the parent theme to your child theme’s footer.php file.

    You could always just use the WordPress text editor and go:

    <p class="contact">Your desired text...</p>

    of course you would have to add the .contact class to your style.css as outlined by Jose.

    Or you could get nasty and use inline styling:

    <p style="text-align: center;">Your desired text</p>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to center text in text widget?’ is closed to new replies.