ADD CODE
google20ec315e3dcb494d.htmlContinue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
google20ec315e3dcb494d.htmlContinue reading
/* * This will work only for Charitable Recurring Donations 1.4.0.4+ * This accepts the HTML of the text box and with a little fancy replacing, allow you to add attributes. */ add_filter( ‘charitable_recurring_custom_amount_input’, ‘test_charitable_recurring_custom_amount_input’, 10, 4 ); function test_charitable_recurring_custom_amount_input(…Continue reading
/** * Change the payment field value based on user role and early-bird date. * * @param array $properties The field properties. * @param array $field The field settings. * @param array $form_data The form data. * * @return array…Continue reading
/** * Change the payment field value based on user role. * * @param array $properties The field properties. * @param array $field The field settings. * @param array $form_data The form data. * * @return array */ add_filter( ‘wpforms_field_properties’,…Continue reading
add_filter( ‘wpforms_field_properties’, ‘custom_address_state_optional’, 10, 3 ); function custom_address_state_optional( $properties, $field, $form_data ) { // Check if the field is an Address field. if ( ‘address’ === $field[‘type’] ) { // Set the ‘required’ property of the ‘state’ subfield to false.…Continue reading
function custom_hide_sidebar_on_mobile() { echo ‘ ‘; } add_action(‘wp_head’, ‘custom_hide_sidebar_on_mobile’);Continue reading
/** * IMPORTANT: After activating this snippet you have to change the default avatar option in Settings » Discussion to “Custom Avatar” as defined below. */ add_filter( ‘avatar_defaults’, function( $avatar_defaults ) { $new_avatar_url = ‘https://wpcode.com/wp-content/uploads/2024/09/wpcode-avatar.png’; // Replace this with your…Continue reading
add_filter(‘manage_page_posts_columns’, ‘my_custom_column’, 10); add_action(‘manage_page_posts_custom_column’, ‘add_my_custom_column’, 10, 2); function my_custom_column($defaults) { $defaults[‘url’] = ‘URL’; return $defaults; } function add_my_custom_column($column_name, $post_id) { if ($column_name == ‘url’) { $siteURL=get_site_url($post_id); $link= get_permalink( $post_id ); echo str_replace($siteURL,””,$link); } }Continue reading