Ecommerce Shopify WordPress Discussion

Display Custom Post type in WooCommerce Product loop

I've created a custom post type called "promo" with a meta field named "position." The admin can add any number of promos and assign a numeric value to the position field. Now, when a user visits the WooCommerce shop page, I want the promos to appear between the products. For example, if a page has 12 products and the admin adds a promo with position 5, the promo should appear at position 5 within the product loop. I've attempted to use the 'woocommerce_shop_loop' action, but it disrupts the pagination. Is there another solution to achieve this functionality without affecting pagination? add_action( 'woocommerce_shop_loop', 'wc_shop_loop', 100 ); With custom product loop as well $args = array( 'status' => 'publish', 'category' => isset($term->slug) ? array( $term->slug ) : '', 'limit' => $products_per_page, 'page' => $paged, 'paginate' => true, 'return' => 'ids', 'orderby' => $ordering['orderby'], 'order' => $ordering['order'], ); $products_ids = wc_get_products($args);
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.