Originally Posted by
ckalech
I'm looking for a way to disable the link which has the text Item Name at the top of a product listing on the category page and sorts the products by ascending/decending order. I changed the + and - in the admin interface to be blank, but clicking on "Item Name" still allows the sort and there is no way to return to the order according to the customized order set in the product admin interface so I just want to disable the link totally. How can I do this - if not in the admin interface, where is it in the php code?
I was asking myself the same question. There was no post here in the forum that answered it as far as I could see, so searched the code instead. The solution is simple.
in includes/modules/product_listing.php, there is a call to zen_create_sort_heading(), which produces the sorting links on the headers. This is on or about line 63. I had a CUSTOM folder for my theme in this same location, so I copied product_listing.php into my CUSTOM folder, commented out lines 62-64, and my linked headers became plain, unlinked headers. No core mod!
For those who are concerned about SEO but would still like the sorting links, you could modify the zen_create_sort_heading() function that makes the link. It's in includes/functions/function_general.php, starting around line 500. The code you change is a few lines into this short function:
Change from:
Code:
$sort_prefix = '<a href="' . zen_href_link($_GET['main_page']...
To:
Code:
$sort_prefix = '<a rel="nofollow" href="' . zen_href_link($_GET['main_page']...
I shortened the line because it's quite long. Just stick that rel="nofollow" in there and the search engines will ignore it.
I hope this helps.
Frank
Bookmarks