Skip to content

Commit

Permalink
Make sort headings rel=nofollow, for SEO.
Browse files Browse the repository at this point in the history
Avoids unnecessary crawling of results pages by not following links that
only change the sort order of results, not the actual content.
  • Loading branch information
neekfenwick committed Nov 6, 2023
1 parent 9ae0b14 commit 8e8ec6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/functions/functions_general.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function zen_create_sort_heading($sortby, $colnum, $heading)
$sort_suffix = '';

if ($sortby) {
$sort_prefix = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . zen_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">';
$sort_prefix = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . zen_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading" rel="nofollow">';
$sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? PRODUCT_LIST_SORT_ORDER_ASCENDING : PRODUCT_LIST_SORT_ORDER_DESCENDING) : '') . '</a>';
}

Expand Down

0 comments on commit 8e8ec6e

Please sign in to comment.