Extend product search with meta in WooCommerce
Extend product search with meta in WooCommerce
Extend product search with meta in WooCommerce
How do you replace content generated by custom fields with custom blocks in Block Editor?
So I figured out a work around by butchering this and placing in parts from other solutions found online. This is the code I got working correctly. functions.php: /* ** START ** ADDS A NEW META BOX TO PAGES */ // register the meta box add_action( ‘add_meta_boxes’, ‘my_custom_field_cityselect’ ); add_action( ‘load-page.php’, ‘my_custom_field_cityselect’ ); add_action( ‘load-page-new.php’, … Read more
Understanding the orderby in WP_Query?
Woocomerce custom billing address fields display in order details [closed]
AFAIR get_field() function comes with ACF and there is no such function built in WP. It isn’t obvious, based on your code, that you use ACF plugin on your site, so there is a chance it might not work. But, since you already use native WP function for setting the meta data, then it would … Read more
I’ve figured out a fix. First, to fix bad results for an empty search, I require that (!empty(get_query_var(‘s’)) Before setting the “meta_query” query variable in my plugin. I thought the fix would be with the posts_request filter, but it continued to replace select SQL_CALC_GET_ROWS wp_posts.ID with select SQL_CALC_GET_ROWS wp_posts.* Even when I replaced the * … Read more
You can use usermeta wordpress function to add extra information for user, below code will help you function crm_wp_insert_user() { if ( isset($_POST[‘crm_customer_submitted’] ) ) { $firstname = sanitize_user( $_POST[‘firstname’] ); $lastname = sanitize_user( $_POST[‘lastname’] ); $project = sanitize_user( $_POST[‘project’] ); $email = sanitize_email( $_POST[’email’] ); $phone = sanitize_user( $_POST[‘phone’] ); $address = sanitize_user( $_POST[‘address’] … Read more
Okay. I solved the problem myself. I was not populating the the array of a meta_key the correct way. Below, you will find a working solution: $check_post_exists = function( $title ) use ( $wpdb, $postTypeArray ) { // Get an array of all posts within our custom post type $posts = $wpdb->get_col( “SELECT post_title FROM … Read more
I think I found another way. Seems to be working great. /****** CUSTOME POST-TYPE ******/ <?php // CREATE CUSTOME META BOX function r_create_mb_bids(){ add_meta_box( ‘r_bid_visibility_mb’, __( ‘ Bid Visibility’, ‘bids’ ), ‘r_bid_visibility_mb’, ‘bids’, ‘normal’, ‘high’ ); } add_action( ‘add_meta_boxes’, ‘r_create_mb_bids’ ); // DISPLAY IN ADMIN function r_bid_visibility_mb( $post ){ global $post; $bid_data = get_post_custom($post->ID); $visibility … Read more