• I use filters on a page instead of the regular woo product categories. So the breadcrumbs lead to the regular shop categories. No good for me. I’d like to put a back to previous page on the product detail page instead of the breadcrumb. I searched for solutions but could not make it work with the Astra theme. I have tried this code:

    add_filter( 'body_class', 'custom_body_class' );
    
    // Add link to Previous Page
    // =============================================================================
    function add_backbutton(){
      
      if ( x_is_product() ) {
         echo "<div class='cat-prod-link-back x-container max width'><a href='#' onClick='history.go(-1); return false;'>Back to previous page</a></div>";
      }
    
    }
    add_action('x_after_view_integrity__breadcrumbs', 'add_backbutton');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Back button or link instead of breadcrumb’ is closed to new replies.