How to use get_post_meta()

October 10, 2022

get_post_meta() is a WordPress function used to retrieve the value of a custom field for a specific post. Here’s how to use it: Retrieve the… Read More →

Change post thumbnail size To change post thumbnail size, First check your theme support function add_theme_support(‘post-thumbnails’); Default WordPress Thumbnail the_post_thumbnail( ‘thumbnail’ ); // Thumbnail (150… Read More →

WooCommerce get all products $products = wc_get_products( array( ‘status’ => ‘publish’, ‘limit’ => -1 ) ); foreach ( $products as $product ){ echo  $product->get_status();  // Product status echo  $product->get_type();  // Product type echo  $product->get_id();    // Product ID echo  $product->get_title(); // Product title echo  $product->get_slug(); // Product slug echo  $product->get_price(); // Product price… Read More →