Type: php
Hide Elementor AI Image
/* * Hide Elementor image optimization ads when choosing the post’s featured image on the backend * UPDATE: 20/06/24 Hide Elementor image optimization ads on Media Library, if closing the “x” is not enough. */ function hide_elementor_nag_admin() { ?>Continue reading
ACF: Author
// ACF custom variables $knowsabout = get_field( ‘author_knowsabout’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout2 = get_field( ‘author_knowsabout_2’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout3 = get_field( ‘author_knowsabout_3’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout4 = get_field( ‘author_knowsabout_4’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout5 = get_field( ‘author_knowsabout_5’,…Continue reading
Elementor Form Autofill
/** * Add autocomplete setting to form fields. */ add_action( ‘elementor/element/form/section_form_fields/before_section_end’, function( \Elementor\Widget_Base $widget ) { $elementor = \ElementorPro\Plugin::elementor(); $control_data = $elementor->controls_manager->get_control_from_stack( $widget->get_unique_name(), ‘form_fields’ ); if( is_wp_error( $control_data ) ) { return; } $control_data[‘fields’] = $control_data[‘fields’] + [ ‘namespace_autocomplete’ =>…Continue reading
How to Add Christmas Celebration Animation in WordPress Website
function add_custom_div(){ // add your custom code here to do something echo ‘ ‘; echo ‘ ‘; } add_action( ‘wp_footer’, ‘add_custom_div’ ); function snow_js() { ?>Continue reading
Displaying the Total Number of Entries on Your Site
/** * Custom shortcode to display the total number of entries for a form. * * Basic usage: [wpf_entries_count id=”FORMID” type=”TYPE”] * * Realtime counts could be delayed due to any caching setup on the site * * @link https://wpforms.com/developers/how-to-display-the-total-number-of-entries/…Continue reading
Adding French Time Format for the Date / Time field
/** * Add additional formats for the Time field Format dropdown using French time format. * * @link https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-time-field-time-picker/ */ function wpf_dev_date_field_time_formats_french( $time_formats ) { $time_formats[ ‘G\\\hi\\\m’ ] = ‘French Format’; return $time_formats; } add_filter( ‘wpforms_datetime_time_formats’, ‘wpf_dev_date_field_time_formats_french’, 10, 1 );Continue reading
Creating Additional Format for the Date / Time field
/** * Add additional formats for the Time field Format dropdown. * * @link https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-time-field-time-picker/ */ function wpf_dev_date_field_time_formats1 ( $time_formats ) { // Displays 2-digit hour, 2-digit minute, and 2-digit seconds $time_formats[ ‘H:i:s’ ] = ‘HH:MM:SS’; return $time_formats; } add_filter(…Continue reading
fitnesswithnadeem
Changing sublabels for Email Field on a Single Form
/** * Customize email field properties. * * @link https://wpforms.com/developers/how-to-change-sublabels-for-the-email-field/ */ function wpf_dev_email_field_properties( $properties, $field, $form_data ) { // Only process this snippet on the form ID 123 if ( absint( $form_data[ ‘id’ ] ) !== 123 ) { return…Continue reading