[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

Joomla 2.5.x. How to edit/remove gallery filter/sort options

This tutorial is going to show you how to edit/remove gallery filter/sort options on your Joomla 2.5 based template. For instance, the options on your gallery pages you want to edit say

Joomla 2.5.x. How to edit/remove gallery filter/sort options

  1. The headings like Filter:/Sort:/Sort order:  can be changed in the en-GB.tpl_themeXXXX.ini file located in the \language\en-GB folder (en-GB.tpl_themeXXXX.ini in \themeXXXX\language\en-GB folder) on your FTP where it says
  2. ;----------------------------------------
    GALLERY_FILTER="Filter:"
    GALLERY_SORT="Sort:"
    GALLERY_VIEWS="Views:"
    GALLERY_SORT_DIRECTION="Sort order:"

  3. You can remove the Filter part and change the word All in the category.php file located in the \templates\themeXXXX\html\com_k2\templates\portfolio folder on your FTP (lines 69-79) where it says
  4. <div id="isotopeOptions">
    <?php if(!empty($tags)){ ?>
    <span><strong><?php echo JText::_('GALLERY_FILTER'); ?></strong></span>
    <ul id="filters" class="option-set">
    <li><a href="#" data-filter="*" class="selected">All</a></li>
    <?php
    foreach ($tags as $tag) {
    echo "<li><a href='#' data-filter='.".strtolower(str_replace(" ","_",$tag))."'>".$tag."</a></li>";
    }
    ?>
    </ul>
    <?php } ?>

    The listed filters can be managed through the admin panel of  your Joomla site under the menus Components -> K2 -> Tags.

  5. You can remove the Sort order part and change the words title, date, views in  the same category.php file where it says (lines 81-89):
  6. <div class="clr"></div>

    <?php if(!empty($catItems) || !empty($catItemTitles) || !empty($catItemDate)): ?>
    <span><strong><?php echo JText::_('GALLERY_SORT'); ?></strong></span>
    <ul id="sort" data-option-key="sortBy" class="option-set">
    <li><a href="#sortBy=#title" data-option-value="title" class="selected">title</a></li>
    <li><a href="#sortBy=#date" data-option-value="date">date</a></li>
    <li><a href="#sortBy=#views" data-option-value="views">views</a></li>
    </ul>
  7. You can remove the Sort part and change the words sort ascending/sort descending  in  the same category.php file where it says (lines 91-98):
  8. <div class="clr"></div>

    <span><strong><?php echo JText::_('GALLERY_SORT_DIRECTION'); ?></strong></span>
    <ul id="sort_direction" data-option-key="sortAscending" class="option-set">
    <li><a href="#sortAscending=true" data-option-value="true" class="selected">sort ascending</a></li>
    <li><a href="#sortAscending=false" data-option-value="false">sort descending</a></li>
    </ul>

Feel free to check the detailed video tutorial below:

Joomla 2.5.x. How to edit/remove gallery filter/sort options