0

I dont know much about coding... I found some JS and Jquery to disable links here but I dont know how to use them and where to put them...

This is the code in the title.php of my single product

<div class="product-categories"><?php echo $product->get_categories(); ?></div>
<h1 itemprop="name" class="product_title entry-title"><?php the_title(); ?></h1>

In the first line, there if have to disable the link on the categories and subcategories. I'd like to keep the display of them. In first instance I did some CSS on them, but that only worked in modern Chrome, not IE etc...

Can someone help me on editing that first line so the links are disabled?

Thanks in advance!

Kelly

jh314
  • 24,533
  • 14
  • 58
  • 79

2 Answers2

0

css can do it...

div.product-categories a{
pointer-events: none;
}

you may have to fine tune it so as not to disable links that you need within .product-categories.

Joe Barrett
  • 135
  • 1
  • 10
  • But thanks, anyway... If I dont find an answer with jQuery or JS, you think maybe it is possible to hide them competly only on IE? So they will only displayed on other browsers who do support this CSS. – Kelly Herman May 12 '15 at 17:31
0

I solved my problem by adding code to my functions.php that is displaying the categories before the title on single product. Then I've hidden the existing ones with the link via CSS. Now the single product page is displaying the categories but they dont link true to archives pages.

Thanks for the help!

Kelly