You are here:  » Make category urls lowercase

Active Forum Topics


Make category urls lowercase

Submitted by magnaromagna on Thu, 2021-01-07 07:43 in

Hi!
I followed instructions of thread https://www.pricetapestry.org/node/125
and product urls are lowercase, but categories are still with uppercases, like
category/Section1/Name-of-Category

How can I have
category/section1/name-of-category/ urls?

Thank you in advance

Submitted by support on Thu, 2021-01-07 08:23

Hi,

To make lowercase, edit pto_atoz.php and look for the following code beginning at line 135:

      if (($module=="category") && $pto_config_useCategoryHierarchy)
      {
        $itemURL = get_bloginfo('url').$$baseHREFVar."/".pto_common_hyphenate((isset($pto_nodeInfo)?$pto_nodeInfo["path"]."/":"").$row->category);
      }
      else
      {
        $itemURL = get_bloginfo('url').$$baseHREFVar."/".pto_common_hyphenate($row->$module);
      }

...and REPLACE with:

      if (($module=="category") && $pto_config_useCategoryHierarchy)
      {
        $itemURL = get_bloginfo('url').$$baseHREFVar."/".strtolower(pto_common_hyphenate((isset($pto_nodeInfo)?$pto_nodeInfo["path"]."/":"").$row->category));
      }
      else
      {
        $itemURL = get_bloginfo('url').$$baseHREFVar."/".strtolower(pto_common_hyphenate($row->$module));
      }

Cheers,
David.
--
PriceTapestry.com