Your query returns an array of posts (query all products belonging to specific cat product cat), in your case it looks like there’s ony one.
To display a list on your custom page you’ve to iterate the array with:
$args = array( 'post_type' => 'product', 'product_cat' => 'category-id' );//note that this looks like a mistake, if you want to query by id this should be an integer or an integer variable (i.e. $catid coming from somewere earlier defined)
$query = new WP_Query($args);
$posts = $query->posts;
foreach($posts as $post) {
// Do your stuff, e.g.
// echo $post->post_name;
get_template_part( 'woocommerce/single-product');//this may or not work, it possibly need some adjustment
}
Related Posts:
- Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
- ( Woocommerce) How to get the user belonging to an order? [closed]
- WooCommerce: Webhook disabled on its own
- How to delete woo commerce order pragmatically? [closed]
- How to turn off WooCommerce user registration and manually create accounts?
- WooCommerce Change Product Global Attribute Value via CRUD for Simple Product [closed]
- When Free shipping is available hide other shipping methods except Local pickup in WooCommerce [closed]
- Change WooCommerce Image Size in One Product CAtegory
- Woocommerce Shop Price Position
- How to disable users from editing billing address in WooCommerce checkout?
- Move WooCommerce product tabs out of the tabs [closed]
- WooCommerce WebHook Retry
- Can I set a custom “alt” attribute with woocommerce_get_product_thumbnail()?
- Remove all Span Tags and class From Woocommerce Price [closed]
- Importing Woocommerce products with variations
- Woocommerce login not working on the first try
- Show add to cart button on shop woocommerce
- How do I hide the purchase note in the WooCommerce ‘order completed’ email?
- Woocommerce – Override the default templates location under the theme directory
- How to hide out of stock products in Related Products via custom query in WooCommerce
- Changing Woocommerce language without changing the language in Dashboard admin WordPress
- How to unset fields in woocommerce product quick edit?
- rating, share and review issue for single WooCommerce page
- Delete All Product Images in phpmyadmin
- Custom PLU field in woocommerce email
- I want to get the value of a select attribute in the checkout page, and then use it to show or not the delivery data
- Display Advanced Custom Fields value in Woocommerce admin order details
- Some images aren’t shown on wordpress after installation on host
- How to display text between product thumbnail and CTA button on WooCommerce “Shop” page
- WordPress & WooCommerce: Localhost, Staging and production environments and how to sync them without losing data
- PayPal Express on product page in WooCommerce – doesn’t seem to work on product page?
- Woocommerce – Want to block a user agent from accessing specific product pages
- Reset all stock status in woocommerce
- Additional fields on Woocommerce’s rating system
- Woocommerce product image [closed]
- Question on WooCommerce Syntax
- Tax are not showing on order while placing order with REST API
- woocommerce_new_product action doesn’t fire
- Change The Woocommerce Product Categories Dropdown Widget Placeholder Text
- how to create additional button on single product page
- minimum order item for certain products exempting 2 other products (in bulk)
- Is it possible to checkout with 2 different shipping options on a single order? [closed]
- Sender e-mail address, for new order email to customer, is suddenly wrong [closed]
- Pass class to Woocommerce shortcode [relative_products] [closed]
- Undo WooCommerce CSV import
- A Woo commerce extension has deleted my old theme.How to undo? [closed]
- How can I remove a WooCommerce Product Tab’s sub section in wp-admin?
- Woocommerce Advanced Shipping (WAS) condition is not being called when selecting “Ship to different address” [closed]
- Strip string from $_product->get_title() to get a cleaner mini-cart
- WooCommerce Meta
- WooCommerce Product Table Conditional styling
- Product page attributes dropdown show price
- Smart Design for Blog + Woocommerce + LearnDash + Forum/Bodyboss
- Ajax add to cart not updating Elementor mini cart totals
- I want to store user password (during registration) in an other table in the same database in addition to the user table MD5 Hash
- How to edit the default woo-commerce Store page meta title tag “Products”
- How can I make a thumbnail slider
- WooCommerce – 500k Jump in Order Number?
- Custom Email via Hook only for completed order
- Need help with woocommerce roles
- Change WooCommerce product and variation prices programatically without affecting performance
- Help to locate a woocommerce hook method
- woocommerce_product_quick_edit_save hook not fired
- Changing Title Tag on Shop Archive Page (current solution reverting to Title of First Product in Loop)
- What is the meta_key for woocommerce discount amount?
- Can I use taxonomies to make a multistore with woocommerce?
- Why does wc_get_products($arg) return no products when $arg = ‘average_rating’ => 5.0
- Query product’s image path by category WooCommerce database?
- Delete comma in front of currency woocommerce
- Not displaying Category and subcategory from woocommerce Pluign
- woocommerce_sessions – Table does not exist
- How update price for variable product
- currentURL is not defined
- Woocommerce add 15% discount to a product if quantity is greater than or equal to 6
- Related products based on keywords
- Add button linked to single product page on order detail page
- Woocommerce REST API not considering discounts and coupons
- Multiple sorting criteries (order by)
- syntax error – woocommerce
- How to on/off woocommerce filter with redux framework [closed]
- How to set up a single product shop with woocommerce? Skipping the product archive
- I’m trying to display product categories on each product in the list
- Cross-sells on WooCommerce product page
- Admin Order adding an extra product on add_line_item
- Woocommerce update cart
- Get WP All Export row ID
- Is it possible Different templates of products for specific category in WooCommerce?
- WooCommerce – missing products when viewed by tag
- Quotes not rendering properly in WooCommerce settings API [closed]
- Hiding all products except for one in wordpress admin panel
- Allow authors to use their own PayPal account and payment process automation [closed]
- Can a woocommerce hook alter the UI of a website?
- Edit woocommerce subscription email
- cannot create product attribute (taxonomy) and add terms on the same execution
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- How do I remove the recurring total from thank you for your order email?
- Display product categories + child-categories on a single product page
- I want to Display custom woocomerce meta box in orders list
- Detect Product Type with code
- Verify if woocommerce supports this design [closed]