Cannot save underscore custom fields in one wordpress installation using xmlrpc and underscores

You have to unprotect meta to be able to access it with XML-RPC: <?php function my_unprotect_meta( $protected, $meta_key, $meta_type ) { if( ‘_al_listing_price’ == $meta_key ) { return false; } } add_filter( ‘is_protected_meta’, ‘my_unprotect_meta’, 10, 3 ); The solution you’ve mentioned in the comment to the question is ‘duct tape’ though it works. It completely … Read more

WP_QUERY with group by with custom fields

(Revised answer) So after discussing via the comments, what you really need is a custom ORDER BY clause, which in WordPress post queries (WP_Query), you can set the clause via the posts_orderby filter just like you can set custom GROUP BY clause via the posts_groupby filter. The order that I need is June – 2019 … Read more

per blog metadata for plugin

Options are site specific, so you just need to use update_option() and get_option(). The network-wide equivalents are update_network_option() and get_network_option(). Note that update_site_option() is just a wrapper for update_network_option(), and is an older name from when a multisite network was (confusingly) called a ‘site’. The same applies for get_site_option().

WP ForLoop to compare meta information of posts to determine what post to display

Your query should be something like this: $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 1, ‘meta_key’ => ‘<ACF FIELD KEY HERE>’, ‘meta_value’ => date( “Ymd” ), ‘meta_compare’ => ‘>’, ‘meta_query’ => array( ‘key’ => ‘<ACF FIELD KEY HERE>’, ‘value’ => date( “Ymd” ), ‘compare’ => ‘>’ ), ‘orderby’ => ‘meta_value_datetime’, ‘order’ => ‘ASC’, ); … Read more

Display a post from custom post type only if all the selected taxonomies and custom field value matches the record

You have set “roll_number” custom field in tax_query. It should be in “meta_query”. Please try the updated code: tion exam_result_filter_function(){ $args = array( ‘post_type’ => ‘exam_result’, ); if( isset( $_POST[‘school_class’] ) || !empty( $_POST[‘academic_year’]) || !empty( $_POST[‘roll_number’]) ){ $args[‘tax_query’] = array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘school_class’, ‘field’ => ‘id’, ‘terms’ => $_POST[‘school_class’], ), … Read more