Home › Forums › WoodMart support forum › Product Navigation Issue
Product Navigation Issue
- This topic has 10 replies, 3 voices, and was last updated 4 years, 3 months ago by
mfj1.
-
AuthorPosts
-
October 4, 2018 at 10:29 am #80851
BiotulaParticipantHi,
The product navigation is a great feature but is there a way to prevent it from displaying hidden products from the catalogue (i.e. gifts)?
Thanks.
October 4, 2018 at 11:29 am #80863
Artem TemosKeymasterHi,
Our product navigation is based on standard WordPress functions and unfortunately, it is not possible to prevent it from showing any kind of products.
Regards
October 4, 2018 at 2:33 pm #80914
BiotulaParticipantget_next_post() and get_previous_post() functions can easily exclude categories for example… I’ve managed to change it in the woodmart_products_nav() function.
Maybe there’s room for improvment here.Regards.
October 4, 2018 at 2:53 pm #80928
Artem TemosKeymasterHow exactly did you change them?
October 4, 2018 at 3:58 pm #80946
BiotulaParticipantif 15 is the tag_ID of the gift category for example, I can replace :
$next = get_next_post(); $prev = get_previous_post();
by
$next = get_next_post(false, "15"); $prev = get_previous_post(false, "15");
It’s also possible to pass an array of tag_ID.
October 4, 2018 at 4:52 pm #80950
Artem TemosKeymasterOK, we are glad that you sorted it out.
November 6, 2020 at 11:08 pm #239596
mfj1ParticipantHi,
Just noticed this problem myself. Is there still no official solution?
I spent a few hours last night misunderstanding how a solution may work (won’t bore you with them but they were all promising, and all failed!) but eventually worked out how the exclusion field works.
My hidden products use the taxonomy ID 86. So overriding the pluggable function woodmart_products_nav in the mu-plugins folder and adding 86 to that field (ie, get_next_post(false,86); ) works great and now my hidden items don’t show in the product next/prev.
This is important because I am using product bundles and composite products, and without it shows items that should not be shown to customers but are needed to be part of bundles.
Can you please add a field for exclusions in the back end page (Product Page > Show/Hide Elements, under Products navigation) so we can enter the excluded terms ourselves here without having to override the woodmart_products_nav function. It will be very useful for people and save having to override a function which always runs the risk of problems with updates etc
Thanks
November 7, 2020 at 9:32 am #239652
Artem TemosKeymasterHello,
Sorry, but there is no such custom field in our theme at the moment, unfortunately.
Regards
November 8, 2020 at 9:31 am #239844
mfj1ParticipantThanks for the reply but I know there isn’t a custom field for this at the moment, I am asking you if you will add one. It would not be hard for you to do this and it would make life easier for a lot of your paying customers.
November 8, 2020 at 2:33 pm #239908
Artem TemosKeymasterWe will consider this as a feature request for our future updates.
Kind Regards
November 9, 2020 at 7:46 pm #240259
mfj1ParticipantThank you
-
AuthorPosts
- You must be logged in to create new topics. Login / Register