1. Knowledge Base
  2. Password Protected Categories
  3. Advanced Usage

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' );
Need professional assistance?
We've partnered with Codeable to provide our customers with expert help if required.
Still need help?
If searching the knowledge base hasn't answered your question, please contact support.

Related Articles