Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM › Tag limit
- This topic has 20 replies, 2 voices, and was last updated 5 years, 1 month ago by
Sarmistha Chakraborty.
- AuthorPosts
- April 3, 2020 at 12:50 am #114867
Rochus de Quastenit
ParticipantI want to set a limit on tags for my store but i can not find where that option is. i only see a category limit.
- April 3, 2020 at 5:26 pm #115085
Sarmistha Chakraborty
MemberHello,
Sorry we don’t have this feature.
Thank You.
- April 3, 2020 at 6:38 pm #115103
Rochus de Quastenit
ParticipantIs there a way that i can add a tag with custom code or a plugin?
- April 4, 2020 at 2:01 pm #115289
Sarmistha Chakraborty
MemberHi,
Add the below code n your activated theme’s functions.php
add_filter('wcfm_is_tags_input','__return_false');
And add the below script in your theme’s js file,
jQuery(document).ready(function ($) { $('.product_tags_as_dropdown').select2({ maximumSelectionLength: 2 //replace with your tag limit }); $('.product_tags_as_dropdown').select2('reload'); });
Thanks.
- April 4, 2020 at 7:59 pm #115374
Rochus de Quastenit
ParticipantHello, thanks for the code! but the code ensures that vendors can only use tags that are already there. and not being able to create more tags that don’t exist yet.
- April 6, 2020 at 6:17 pm #115945
Sarmistha Chakraborty
MemberHello,
In this case vendor can not create new tag. He can assign only existing tags.
Thanks.
- April 7, 2020 at 12:46 pm #116258
Rochus de Quastenit
Participantis it also possible to get this feature but vendors are still be possible to make new tags? it is really important to my site.
- April 7, 2020 at 7:55 pm #116418
Sarmistha Chakraborty
MemberHello,
In this case please do not add the previously mentioned code,
Add the below script in your theme’s js file,jQuery(document).ready(function ($) { $('textarea#product_tags').on('keypress',function(e){ var n = 3; //add your number of tags limitation var charCount = $(this).val().split(/[\.,\?]+/).length; if(charCount >= n+1) { alert("You cann't add more than "+n); e.preventDefault(); } }); });
Thanks.
- April 7, 2020 at 9:59 pm #116460
Rochus de Quastenit
ParticipantHello, I’ve added the code to my theme’s js file, but for some reason it did not work. Other example code did execute, but the code above did not.
- April 8, 2020 at 4:30 pm #116868
Sarmistha Chakraborty
MemberHi,
We assume that you have already removed previous code(otherwise new script will not execute), and you already checked that the new script are include in your site.
Still you having the same problem please share us your site details with site url(Set as private reply), then we will do it for you.Thanks.
- April 8, 2020 at 6:25 pm #116883
Rochus de Quastenit
ParticipantThis reply has been marked as private.- April 8, 2020 at 7:49 pm #116921
Sarmistha Chakraborty
MemberThis reply has been marked as private.
- April 8, 2020 at 8:15 pm #116926
Rochus de Quastenit
ParticipantThis reply has been marked as private. - April 8, 2020 at 11:23 pm #116978
Rochus de Quastenit
ParticipantThis reply has been marked as private.- April 8, 2020 at 11:59 pm #116997
Sarmistha Chakraborty
MemberThis reply has been marked as private.
- April 9, 2020 at 1:03 am #117013
Rochus de Quastenit
ParticipantThis reply has been marked as private.- April 9, 2020 at 1:43 am #117022
Sarmistha Chakraborty
MemberThis reply has been marked as private.- April 9, 2020 at 2:24 am #117029
Rochus de Quastenit
ParticipantThis reply has been marked as private.- April 9, 2020 at 11:50 am #117159
Sarmistha Chakraborty
MemberThis reply has been marked as private.
- April 9, 2020 at 1:28 am #117018
Rochus de Quastenit
ParticipantThis reply has been marked as private. - April 9, 2020 at 1:30 am #117019
Rochus de Quastenit
ParticipantThis reply has been marked as private.
- AuthorPosts
- You must be logged in to reply to this topic.