Assign User Role Conditionally in WordPress
This snippet works with WPForms and the User Registration Add-on. It lets you assign user roles…
Allow Users Without Editing Permissions to Edit Their Author SEO Details
This filter can be used to allow users that don’t have editing permissions to edit their…
How to Automatically Redirect If User Is Already Logged In
/** * Automatic redirect from login form if a user is already logged in * *…
Change Validation Messages for WPML
When you need to provide multiple different language translations, these messages need to be conditionally different.…
Set max-video-preview to 0
This snippet sets max-video-preview robots meta tag to 0
Change Business Info Email Icon
This filter can be used to change the business info email icon. Replace "/assets/images/email-icon.png" with the…
How to Restrict Countries Inside Smart Phone Form Fields
/** * Restrict countries inside the Smart Phone form field * * @link https://wpforms.com/how-to-restrict-countries-inside-smart-phone-form-fields/ */ function…
Hide AlOSEO version number from the front end
This filter can be used to publicly hide the All in One SEO version number.
Focused Form Fields
This CSS snippet will make your fields focused on click.
Prevent Canonical URL tag output on Posts
This snippet can be used to prevent AIOSEO from outputting the Canonical URL tag on posts
How to Move to the Next Page Automatically
/** * Navigate to the next page automatically * * @link https://wpforms.com/developers/how-to-move-to-the-next-page-automatically/ */ function wpf_dev_automatic_next_page( )…
How to Add BCC to Email Notifications (for all forms)
add_filter( 'wp_mail', function ( $args ) { // Add the BCC email address here $bcc_address =…
Reduce Database Calls
You can edit your child theme and replace these calls with more specific information to stop…
How to Center a Form
This code centers the form using margin: 0 auto and sets a maximum width of 500px.
How to Automatically Submit a Form with a Field Choice
/** * Trigger submit from checkbox click * * @link https://wpforms.com/developers/how-to-automatically-submit-a-form-with-a-field-choice/ */ function wpf_dev_automatic_submit_form( ) {…