[Filterable Gallery] Change gallery categories order

Support Forums for LiveMesh Themes & Plugins Forums Wired Theme Support [Filterable Gallery] Change gallery categories order

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19529
    M_DNL
    Member

    Hello,

    > I’m trying to change the list order of gallery categories on the filterable gallery.

    > And I would like to hide the “All” filter in the list.

    I’m actually seeking in gallery-functions.php

    >> First clue :

    gallery-functions.php lines 24-30

            $query_args = array(
                'post_type' => 'gallery_item',
                'posts_per_page' => $args['posts_per_page'],
                'paged' => $paged,
                'orderby' => 'menu_order',
                'order' => 'ASC'
            );
    

    How can I configure the ‘orderby’ ?

    >> Second Clue :

    gallery-functions.php lines 249-280

    if (!function_exists('wired_get_gallery_categories_filter')) {
        /** Isotope filtering support for Gallery pages * */
        function wired_get_gallery_categories_filter() {
    
            $output = '';
    
            $gallery_categories = get_terms('gallery_category');
    
            if (!empty($gallery_categories)) {
    
                $output .= '<ul id="showcase-filter">';
    
                //$output .= '<li class="filter-text">' . esc_html__('Gallery Filter:', 'wired') . '';
    
                $output .= '<li class="segment-0">' . esc_html__('All', 'wired') . '';
    
                $segment_count = 1;
                foreach ($gallery_categories as $term)
                {
    
                    $output .= '<li class="segment-' . $segment_count . '">term_id . '" title="' . esc_attr('View all items filed under ', 'wired') . $term->name . '">' . $term->name . '';
    
                    $segment_count++;
                }
    
                $output .= '';
    
            }
    
            return $output;
        }
    }

    Is the order could be modified here ? Is the “All” filter item could be hidden here ?

    Thank you guys

    #19530
    M_DNL
    Member

    Resolved 50% :

    >> To hide the “All” filter in the list, simply.. hide it..

    .portfolio-archive {
        display:none !important;
    }
    #19532
    M_DNL
    Member

    Resolved 100% :

    >> portfolio-fonctions.php line 348

    Change :
    $portfolio_categories = get_terms($taxonomy);

    To :
    $portfolio_categories = get_terms($taxonomy, array(
    ‘orderby’ => ‘slug’,
    ‘order’ => ‘ASC’
    ));

    #19558
    Veena
    Moderator

    Glad that you found the solution and thanks for sharing the solution with us .

    #19559
    M_DNL
    Member

    In my response, “slug” is the ID of the gallery category. And it will order it alphabetical.

    I just add numbers before Galleries categories ID (ex: 1-webdesign ; 2-print ; 3-branding ; …)

    It works but I’m staying open to better solutions 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Wired Theme Support’ is closed to new topics and replies.