Post navigation header issue when shop page not defined

Hello,
We are using Betheme and Wooocommerce.
In a case, we use the categories pages to access to the products, so the site doesn't have a shop page defined in Woocommerce settings.
Then, on the product page, the link "view all" is broken.

In theme-functions.php there is a check to display the button if the page exists : if( $post_home ) $output .= '<a class="list-nav" href="'. get_permalink( $post_home ) .'"><i class="icon-layout"></i>'. $translate['all'] .'</a>';
But $post_home comes from wc_get_page_id() and it returns -1 when the page doesn't exists.
Is it possible to modify this if( $post_home ) to take into account when the value is -1 too ?
Thank you.

Comments

  • Hi,

    What you ask for, requires files customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact your web developer. Item Policy says:
    Item support does not include services to modify or extend the item beyond the original features, style, and functionality described on the item page. For customization services that will help you tailor the item to your specific requirements, we recommend contacting the author to see if they privately offer paid customisation services or checking out the great service providers on Envato Studio

    thanks
  • Thank you for your answer.
Sign In or Register to comment.