Home Forums WoodMart support forum Product Navigation Buttons – Navigate in the same product category

Product Navigation Buttons – Navigate in the same product category

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #347245

    [email protected]
    Participant

    Hi, We are using the product navigation buttons, in the single product page.

    The navigation of the products is based on the id of the products and this is comfusing for the customer.
    How we can change this fuction to navigate on products in the same product category?
    So if a customer seeing a product in the category Blouses, to navigate on products that have the same product category.

    #347253

    Hello,

    Unfortunately, it is not possible. You can hide this navigation in the Theme Settings > Single product > Show > hide elements and enable Related products that are shown from the same category.

    If you have any questions please feel free to contact us.

    Best Regards

    #347272

    [email protected]
    Participant

    It is not possible or it is not posible to help me do it?

    I mean can a developer to make it work or the way it works making it not possible to develop it?

    #347523

    Hello,

    Please add this code to the functions.php of the child theme:

    add_filter( 'woodmart_get_prev_product_same_term', '__return_true' );

    If you have any questions please feel free to contact us.

    Best Regards

    #347563

    [email protected]
    Participant

    Thank you but seems it doesn’t work.

    #347758

    Hello,

    The navigation works properly and your product relates to three categories: https://gyazo.com/ee724a180d1fd9cdc3f994979da772c7

    We use the default WordPresss function get_adjacent_post() and it is the way it works. If the product is assigned to more than one category, the related products would be shown from all the categories the product has been assigned to.

    Best Regards

    #347837

    [email protected]
    Participant

    Thank you so much.

    Is it possible to check only from the last of the assigned product category?

    #347838

    [email protected]
    Participant

    Second option instead of checking the last assigned product category, to check all the product category tree and shows only products with the same category tree.

    For example if a product has the tree Clothes – Tops – Crop Tops to show products either products that has same the last product category (Crop Tops) either to show products that has exactly the same category tree (Clothes – Tops – Crop Tops)

    Now the way it works as i understand is to check the first category of the tree
    For example if a product has assigned to Clothes – Tops – Crop Tops, it shows products that has assigned Clothes (the first one)

    #347865

    Hello,

    Unfortunately, it is not possible, it would require complicated customization of WordPress functions that are not covered by our support.

    If you have any questions please feel free to contact us.

    Best Regards

Viewing 9 posts - 1 through 9 (of 9 total)