Archives: Snippets
Java
html
Loading custom templates
/** * Plugin Name: WPForms Custom Templates * Description: This plugin loads custom form templates. * Version: 1.0.0 */ /** * Load the templates. */ function wpf_load_custom_templates() { // Template code here } add_action( ‘wpforms_loaded’, ‘wpf_load_custom_templates’ );Continue reading
Custom Template File Hook
// Add Custom Template File include_once( get_stylesheet_directory() . ‘/wpforms-custom-templates.php’ );Continue reading
wordpress
Headers and Footers
WP Simple Pay: Allow Customers to Exempt from Tax
add_filter( ‘simpay_get_customer_args_from_payment_form_request’, function( $customer_args, $form, $deprecated, $form_values ) { $exempt = isset( $form_values[‘simpay_field’][‘Tax Exempt’] ); if ( $exempt ) { $customer_args[‘tax_exempt’] = ‘exempt’; } return $customer_args; }, 10, 4 );Continue reading
Homepage Chatbot
Hide the ‘Screen Options’ Tab on admin bar
// Hide the admin ‘Screen Options’ tab add_filter(‘screen_options_show_screen’, ‘__return_false’);Continue reading