How to add fields in custom registration form, validate it and aave to db? [closed]

To modify the theme’s registration would be possible, but definitely not recommended. It is likely that you would only be able to add your additional fields by directly modifying the theme files, especially with something like user registration. It would be a pain to maintain if you intend to keep your theme up to date. … Read more

ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?

New answer I now have a better understanding of the question thanks to OPs comment and have come up with the following. Not tested! global $wpdb; /** * @var string $field The flexible content field name. */ $field = ‘a_flexible_content_field’; /** * @var string $layout The flexible layout name. */ $layout=”layoutTwo”; /** * @var string … Read more

wp custom field date format compare

Hi @idontknowhow: You’ve focused on trying to solve the problem in PHP when in fact you needed to focus on the SQL. Your first problem was you reversed the “polarity” (which is a term I made up just now, but it kinda fits); you were looking for both a start date that was greater than … Read more

Copy price categories to custom field

paste this code in you theme’s function.php file //get all categorie ID’s in to array $args = array( ‘child_of’ => 3678); // Parent category ID $categories = get_categories( $args ); $cat_array = array(); foreach ($categories as $category) { $cat_array[] = $category->term_id; } $Query_args = array( ‘category__in’ => $cat_array, ‘post_type’ => ‘YOUR_POST_TYPE_NAME’ ); $new_query = new … Read more

How can I combine this php statement to get the results of multiple variable inputs?

If you are using WP 3.1, I would recommend using the meta_query parameter with the WP_Query class. $args = array( “meta_query’ => array( array( ‘key’ => $customkey1, ‘value’ => $customvalue1, ‘compare’ => ‘=’ ), array( ‘key’ => $customkey2, ‘value’ => $customvalue2, ‘compare’ => ‘=’ ) ) ); $query = new WP_Query( $args ); if ( … Read more