This tutorial is going to show you how to sort the default gallery tags on your Joomla 2.5 template.
- On your FTP server go to the templates\theme_###\html\com_k2\templates\portfolio\ folder.
- Open a category.php in any PHP editor.
- Look for the following line using Ctrl + F:
$tags = array_unique($allTags); - Add a new function right under that line:
- Save the changes and check the gallery page on your site.
rsort($tags);
in order to sort the tags in the reverse alphabetical order or
sort($tags);
in order to sort the tags alphabetically
Feel free to check the detailed video tutorial below: