How to use get_the_category() in WordPress
October 12, 2022
get_the_category() is a WordPress function that is used to retrieve the categories that a post belongs to. Here’s how to use it: First, make sure… Read More →
October 12, 2022
get_the_category() is a WordPress function that is used to retrieve the categories that a post belongs to. Here’s how to use it: First, make sure… Read More →
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 →
July 28, 2022
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 →
July 23, 2022
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 →
July 23, 2022
Get all products with php in Woocommerce WordPress require_once(‘../wp-load.php’); global $wpdb; // Get 10 most recent product IDs in date descending order. $query = new… Read More →
July 23, 2022
WooCommerce Products Export to CSV via PHP <?php require_once(‘../wp-load.php’); global $wpdb; // Get 10 most recent product IDs in date descending order. $query =… Read More →