I like the taxonomy terms in my nodes pages, but I don't want user being able to click on them. I just want to remove the links.
I'm trying to remove them from taxonomy module php files, but I cannot find them.
Thanks
I like the taxonomy terms in my nodes pages, but I don't want user being able to click on them. I just want to remove the links.
I'm trying to remove them from taxonomy module php files, but I cannot find them.
Thanks
You never want to edit a core module like taxonomy, as this makes it very complicated to upgrade your Drupal install. See also.
You can use hook_link_alter to alter/remove the links in your own module. Adding them back in as non-links is a little more complicated, but can be done in your node.tpl.php file with example code.
I would suggest Display Suite module or some jQuery
jQuery(".taxonomy-term h2 a").each(function(){
var $t = jQuery(this);
$t.after($t.text());
$t.remove();
Thanks @Will and @Matt for this elegant solution.
try this:
jQuery(".views-field-field-categories >.field-content >a").removeAttr("href");