Home › Forums › WoodMart support forum › Product Navigation Buttons – Navigate in the same product category
Product Navigation Buttons – Navigate in the same product category
- This topic has 8 replies, 2 voices, and was last updated 2 years, 11 months ago by Elise Noromit.
-
AuthorPosts
-
January 23, 2022 at 10:09 am #347245
[email protected]ParticipantHi, 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.January 23, 2022 at 12:13 pm #347253
Elise NoromitMemberHello,
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
January 23, 2022 at 1:34 pm #347272
[email protected]ParticipantIt 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?
January 24, 2022 at 2:14 pm #347523
Elise NoromitMemberHello,
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
January 24, 2022 at 5:54 pm #347563
[email protected]ParticipantThank you but seems it doesn’t work.
January 25, 2022 at 12:18 pm #347758
Elise NoromitMemberHello,
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
January 25, 2022 at 2:34 pm #347837
[email protected]ParticipantThank you so much.
Is it possible to check only from the last of the assigned product category?
January 25, 2022 at 2:38 pm #347838
[email protected]ParticipantSecond 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)January 25, 2022 at 4:57 pm #347865
Elise NoromitMemberHello,
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
-
AuthorPosts
- You must be logged in to create new topics. Login / Register