Hi @Dadparvar,
For that, I recommend contacting a Woocommerce developer as it’s more related to Woocommerce core features. Example, these templates \x\woocommerce\single-product\related.php
and \x\woocommerce\single-product\up-sells.php
,
Examples,
<?php
// =============================================================================
// WOOCOMMERCE/SINGLE-PRODUCT/RELATED.PHP
// -----------------------------------------------------------------------------
// @version 3.0.0
// =============================================================================
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( $related_products && x_get_option( 'x_woocommerce_product_related_enable' ) == '1' ) : ?>
<section class="related products cols-<?php echo x_get_option( 'x_woocommerce_product_related_columns' ); ?>">
<?php The_Grid('Related Products', true); ?>
</section>
<?php endif;
<?php
// =============================================================================
// WOOCOMMERCE/SINGLE-PRODUCT/UP-SELLS.PHP
// -----------------------------------------------------------------------------
// @version 3.0.0
// =============================================================================
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( $upsells && x_get_option( 'x_woocommerce_product_upsells_enable' ) == '1' ) : ?>
<section class="up-sells upsells products cols-<?php echo x_get_option( 'x_woocommerce_product_upsell_columns' ); ?>">
<?php The_Grid('Up Sells', true); ?>
</section>
<?php endif;
This is just a sample, which means you’ll have to add your own conditions (through grid) to display which is related product, or which is up-sells. Which means, it may require different code than provided. Please contact a Woocommerce developer.
About the cross sells, it could be using the same template as up sells since there are no other templates connected to it.
Thanks!