• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Add Custom Class To Style Private Password Protected Posts

This PHP code generates a new custom class you can use to style all your password protected posts.

Add the class to your child themes style.css file and begin styling your password protected posts.

More Ways To Style Protected Posts

.password-protected .entry-content input {
	width: 50%;
}

.password-protected .entry-content input[type="submit"] {
        width: 20%;
}

This sample CSS simply aligns the password form inline so the submit button displays next to the input field on password protected posts only.

From this:

default form

To this:

password protected form

Remove Protected Text Before Title

This PHP code removes the Protected text before the entry title added to password protected posts.

Related Code Snippets

  • Show Password Protected Content To Logged In Users

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.