Divi theme: change overlay color from default blue to back [closed]

Some CSS to change the attributes of the ‘single_add_to_cart_button‘ CSS class (which is used for the button; I found that while using Firebug to inspect the button element). .single_add_to_cart_button:hover {color:#ccc; background-color:#444;} Adjust the colors as desired. Put this in the ‘additional CSS’ of the theme customization. Here’s a place to figure out colors: https://www.w3schools.com/cssref/css_colors.asp .

Daylight Saving Time adjustment

If you head to Settings->General in the WordPress Dashboard you can select a timezone. For example mine is set to London and states: Universal time (GMT) is 2017-08-07 15:46:29. Local time is 2017-08-07 16:46:29. This timezone is currently in daylight saving time. Standard time begins on: 29th October 2017 2:00 am.

How can I apply custom sanitization to new usernames?

sanitize_user function has a sanitize_user filter. The filter gives you $username, $raw_username, $strict from the sanitize_user and expects you to return $username, according to the inline documentation: /** * Filters a sanitized username string. * * @since 2.0.1 * * @param string $username Sanitized username. * @param string $raw_username The username prior to sanitization. * … Read more

Remove year from title

Yes the problem is with the hyphen. WordPress converts hyphens with with spaces to en-dash. Following is the conversion with hyphens with WordPress: Foo {3 hyphens, spaced} Bar → Foo — Bar (em-dash) Foo{3 hyphens, no space}Bar → Foo—Bar (em-dash) Foo {2 hyphens, spaced} Bar → Foo — Bar (em-dash) Foo{2 hyphens, no space}Bar → … Read more

Woocommerce custom checkout form

You can overwrite woocommerce templates placing them in your theme. To overwrite e.g. form-billing.php template, place it in yourtheme/woocommerce/checkout/form-billing.php directory. You can also add filter to overwrite form field rendering function. Or even overwrite whole function. To add new fields refer to WooCommerce documentation. I’m pasting code from documentation for adding fields to not leave … Read more

Dynamically Filtering Posts by Data Points – Any Pointers?

In my opinion the best way to achieve what you want is to use custom fields and meta query linked with a WP Query and Ajax. You can find the documentation here : https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters An example of a WP_Query with meta_query : new WP_Query(array( ‘post_type’ => array(‘post_links’, ‘page’), ‘meta_query’ => array( ‘relation’ => ‘AND’, ‘cost’ … Read more

Gravity Forms – gform_field_value – query custom table breaks functions.php

Add this line, before using $wpdb: global $wpdb; In the line: $item_info = $wpdb->get_row(“SELECT * FROM fm_household WHERE k_RecordNum=’$id'”); in WHERE clause, k_RecordNum is being compared to ‘$id’ string, not to the string value of $id parameter. Change this line to: $item_info = $wpdb->get_row(“SELECT * FROM fm_household WHERE k_RecordNum='{$id}'”); It is very important to check, … Read more