Customize Password-Protected Posts
To customize WordPress-powered password-protected posts such as this one, follow these simple steps.
First open template-functions-post.php and find the function get_the_password_form, which is located near the top of the page.
There are several aspects of this function that you may wish to customize. For example, the Perishable Press website requires several CSS attributes for stylistic control. Thus we simply added the class postpassword to the form input field, as well as the class passwordsubmit to the form submit button. This enabled full stylistic control over password-protected posts. You may also wish to modify the size of the input text field, or even edit the submit-button text.
Finally, remember to check both the post comment view for proper “password message” display. If it is not, edit the local comments.php file (usually near the top) until the message displays correctly.
Related articles
- WordPress Notes Plus
- WordPress Core File Edits at Perishable Press
- WordPress Core Hacks Used at Perishable Press
- Stupid htaccess Tricks
- Create New Permalink Category
- WordPress Tip: Careful with that Autosave, Eugene
- Category LiveBookmarks Plus
About this article
This is article #134, posted by Perishable on Monday, May 22, 2006 @ 10:06am. Categorized as Function, WordPress, and tagged with customize, notes, plus, posts, upgrade, WordPress. Updated on November 04, 2007. Visited 14544 times. 1 Response »
Bookmark • Subscribe • Explore
« Password Protected Post • Up • Create New Permalink Category »