Home › Toolset Professional Support › [Resolved] hide one specific Taxonomy value in Detailview
Problem:
How to hide or remove specific taxonomy term from taxonomy terms attached to post
Solution:
You need to use custom javascript solution in order to remove or hide the specific taxonomy term attached to post while displaying singe post with attached taxonomy terms.
You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/hide-one-specific-taxonomy-value-in-detailview/#post-914745
Relevant Documentation:
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
Tagged: Content Templates, Views plugin
Related documentation:
This topic contains 5 replies, has 2 voices.
Last updated by thomasB-2 6 years, 6 months ago.
Assisted by: Minesh.
Tell us what you are trying to do?
We use a CPT Taxonomy categorie to show a group of CPT-Values on the Startpage ("special offer"). But these categorie should not show in the detailpage of the CPT Value - because it was more for the written functional task used and should not directly announced the user
Is there any documentation that you are following?
I try too, but found nothing in that way.
Is there a similar example that we can see?
hidden link
What is the link to your site?
Hello. Thank you for contacting the Toolset support.
Well - as I understand, you want to hide/remove one specific taxonomy term on all the other pages excluding home page? If yes: - You may need to add some custom CSS or JS that should run in admin and using which you should try to remove/hide that specific taxonomy term.
Please correct me if I do not understand your issue.
Yes, the idea was to hide these specific taxonomy term, because it was used not for "online-view" but only as Backend solution to show a seperated list of cpts in some areas.
But actually i don't know how to add to a specific term a css class to hide it later on.
Well - when you say hide/remove - you mean that you do not want to allow the user to select it - correct? If yes:
Could you please tell me which term you want to hide/remove with access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
Well - I see, there is no easy way to hide that term as we can not differentiate it other than name. So I've added following code to your content template's JS box:
jQuery(document).ready(function($){ $('.taxspan a').each(function(index){ if($(this).text() == 'Special Offers' || $(this).text() == 'Spezial-Angebote'){ $(this).remove(); } }); });
I can see its working. Could you please confirm.
Works perfect, tnx!