1. Home
  2. Knowledge Base
  3. Password Protected Categories
  4. Developer Documentation

How to change the submit button to a <button> element

By default, the plugin uses a <input type="submit" /> element for the category password login form's submit button.

If you want to change this for a button element, you can add the following code to your theme's functions.php file:

function ppc_change_login_submit_button( $form ) {
    return preg_replace( '/<input type="submit"(.*)value="(.*)"(.*)\/>/iU', '<button type="submit"$1value="$2"$3>$2</button>', $form, 1 );
}
add_filter( 'ppc_category_login_form', 'ppc_change_login_submit_button' );
We've partnered with Codeable to provide our customers with expert help if required.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.