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' );

The above code is aimed at developers. If you don't know how to use it then you can use our plugin customization service and we'll be happy to do it for you.

Related Articles

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