Form to custom post type and custom taxonomy

Use WP set object terms $new_post = array( ‘post_title’ => $title, ‘post_content’ => $description, ‘tags_input’ => array($tags), ‘post_address’ => array($address), ‘post_status’ => ‘draft’, // Choose: publish, preview, future, draft, etc. ‘post_type’ => ‘trademen’ //’post’,page’ or use a custom post type if you want to ); //save the new post $pid = wp_insert_post($new_post); wp_set_object_terms( $pid, $industry, … Read more

Query events post type after current date and timezone

date() PHP functions returns the value of time() PHP functions in the specified format. time() use server local time. If you want to get date/time based of WordPress configuration, you could use current_time(), a WordPress function, instead of native PHP functions. // ‘timestamp’ = Unix Timestamp or ‘U’ PHP time format $current_time = current_time( ‘timestamp’ … Read more

Main site single-property.php design, as homepage of a multisite

You have two options; either bake into the theme (functions.php) or write a simple plugin that auto-creates the post based on hooking into after new site (blog) creation: https://codex.wordpress.org/Plugin_API/Action_Reference/wpmu_new_blog Use the insert post function to do the creation: https://developer.wordpress.org/reference/functions/wp_insert_post/ Then, set as the home page based on ID returned: update_option( ‘page_on_front’, $new_page->ID );

date_query won’t accept day parameter, but will accept month and year for a custom post

As said in comments, you should use meta_query. For help on how to query posts by ACF meta field, you can check the ACF documentation: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/ $args = array( ‘numberposts’ => -1, ‘post_type’ => ‘event’, ‘meta_key’ => ‘location’, ‘meta_value’ => ‘Melbourne’ ); // query $the_query = new WP_Query( $args );