Add Custom field under the post title [closed]

The position param is responsible for that. You can find all params with descriptions here. So you’ll have to change that part of your code: ‘options’ => array ( ‘position’ => ‘normal’, ‘layout’ => ‘no_box’, ‘hide_on_screen’ => array ( ), ), to this: ‘options’ => array ( ‘position’ => ‘acf_after_title’, ‘layout’ => ‘no_box’, ‘hide_on_screen’ => … Read more

woocommerce Product shortcode create [closed]

Hello Here is the Shortcode you can use this it will give you title link and image of product. Put this code in functions.php file of your theme. add_shortcode(‘product_data’,’custom_product_function’); function custom_product_function($atts) { $post_id = $atts[‘id’]; $title = get_the_title($post_id); $link = get_the_permalink($post_id); $image = get_the_post_thumbnail($post_id); $data=”<div><a href=””.$link.'”><p>’.$title.'</p></a>’. $image.'</div>’; return $data; } And then add the shortcode … Read more

Can’t display product categories on woocommerce getting Invalid taxonomy?

it’s was working fine last 2 installation Those two installation might still be on WordPress prior to version 4.5.0, and according to the reference: Since 4.5.0, taxonomies should be passed via the ‘taxonomy’ argument in the $args array So: $args = array( ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘taxonomy’ => ‘product_cat’, ); $categories = get_terms( … Read more

WooCommerce add custom product_type_option

Your code only creates the checkbox, you need also to save the value like that add_filter(“product_type_options”, function ($product_type_options) { $product_type_options[“wildcard”] = [ “id” => “_wildcard”, “wrapper_class” => “show_if_simple”, “label” => “Wildcard”, “description” => “Description”, “default” => “no”, ]; return $product_type_options; }); add_action(“save_post_product”, function ($post_ID, $product, $update) { update_post_meta( $product->ID , “_wildcard” , isset($_POST[“_wildcard”]) ? “yes” … Read more