• Having a heck of a time trying to find the correct file to modify to get the “Enter Password” box that is displayed for password protected posts to be center aligned.

    Any suggestions? Tried the docs with no success.

    Thanks-

Viewing 3 replies - 1 through 3 (of 3 total)
  • The first thing that comes to mind, is that depending on how, or if “form” is described in your themes’ style sheet, you may simply be able to add this to the css:

    form { text-align:center;}

    That should center it all. Password prompt text, form and submit button. Now, obviously the potential for conflict is present depending on the theme. The second thing that came to mind was actually hacking a core file. But that’s not necessarily a good thing. Changes are of course lost on an upgrade if you don’t document your changes and make them again.

    On line 1140 of post-template.php you will find this;

    $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post">

    Changing it to this should accomplish the same thing.

    $output = '<form style="text-align:center;" action="' . get_option('siteurl') . '/wp-pass.php"

    I don’t like that method at all. Take a look in your style sheet and see if that solution would do it for you. Meanwhile, maybe someone will come along and offer a tidier solution.

    Good luck!

    Thread Starter eagleout

    (@eagleout)

    Thanks Clayton, the first example did the trick!

    You’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Center Enter Password Box’ is closed to new replies.