How to center text in text widget? (5 posts)

  1. mirmark
    Posted 2 years ago #


    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!

  2. Jose Castaneda
    Posted 2 years ago #

    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. :)

  3. mirmark
    Posted 2 years ago #

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

  4. Jose Castaneda
    Posted 2 years ago #

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

  5. Dave Naylor
    Posted 2 years ago #

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic