• Hi
    I have a two different single-content template(content-single-product.php and content-single-product2.php) but in a navigation next and prev of alternative template (content-single-product2.php) its open a standard template (content-single-product.php)
    How can fix it?

    MY STRUCTURE:
    single-product.php

    if (strpos($_SERVER[‘HTTP_REFERER’], ‘?product_tag=’) !== false ){
    wc_get_template_part( ‘content’, ‘single-product2t’ );
    }

    else {wc_get_template_part( ‘content’, ‘single-product’ );
    }
    ———
    content-single-product.php

    <?php previous_post_link_product(‘%link’, ‘<‘, true); ?>
    <?php next_post_link_product(‘%link’, ‘>’, true); ?>
    ——
    content-single-product2.php

    <?php previous_post_link( ‘%link’, ‘n’,TRUE, ‘ ‘, ‘product_tag’) ; ?>
    <?php next_post_link( ‘%link’, ‘n’,TRUE, ‘ ‘, ‘product_tag’); ?>

    • This topic was modified 8 years, 2 months ago by gmazzotta.
  • The topic ‘navigation in different content product template’ is closed to new replies.