Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Joyn › Problem with gallery category filter
New Landing › How can we help? › Themeforest Theme Support › Joyn › Problem with gallery category filter
- This topic has 12 replies, 2 voices, and was last updated 9 years by
Mohammad – SUPPORT.
-
Posted in: Joyn
-
February 12, 2015 at 7:34 am #149280
The problem with the filter categories in the gallery if I do not choose a category to filter, it shows everything is fine, but if you select a category to filter it shows the URL instead of names.
My options of gallery – http://i.gyazo.com/2304803c53d8635cd61074d8a44ac671.png
My options of gallery category –http://i.gyazo.com/49e7aa92c6d7a6700c8b3bef00e32161.png
My options of gallery widget – http://i.gyazo.com/15bcaf1b52040bf7627080ef2423763e.png
How it displays – http://simonovvlad.ru/test/February 12, 2015 at 11:23 am #149377Hi,
Please paste given below code at functions.php of child theme.function sf_portfolio_filter( $style = "basic", $parent_category = "" ) { $filter_output = $tax_terms = ""; if ( $parent_category == "" || $parent_category == "All" ) { $tax_terms = sf_get_category_list( 'portfolio-category', 1 ); } else { $tax_terms = sf_get_category_list( 'portfolio-category', 1, $parent_category ); } $filter_output .= '<div class="filter-wrap clearfix">' . "\n"; $filter_output .= '<ul class="post-filter-tabs filtering clearfix">' . "\n"; $filter_output .= '<li class="all selected"><a data-filter="*" href="#"><span class="item-name">' . __( "Show all", "swiftframework" ) . '</span></a></li>' . "\n"; foreach ( $tax_terms as $tax_term ) { $term = get_term_by( 'slug', $tax_term, 'portfolio-category' ); if ( $term ) { $filter_output .= '<li><a href="#" title="' . $term->name . '" class="' . $term->slug . '" data-filter=".' . $term->slug . '"><span class="item-name">' . $term->name . '</span></a></li>' . "\n"; } else { $filter_output .= '<li><a href="#" title="' . $term->name . '" class="' . $term->slug . '" data-filter=".' . $term->slug . '"><span class="item-name">' . $term->name . '</span></a></li>' . "\n"; } } $filter_output .= '</ul></div>' . "\n"; return $filter_output; }
Thanks
MohammadFebruary 12, 2015 at 3:03 pm #1495211.We talked about the categories in the gallery, may be we need ‘gallery-category’ ?
2.Still not workingFebruary 13, 2015 at 1:38 pm #149882I wait for some solution to the problem or not?
1.We talked about the categories in the gallery, may be we need ‘gallery-category’ ?
2.Still not workingFebruary 13, 2015 at 2:30 pm #149926Hi,
I have resolved the issue so please check.
Thanks
MohammadJuly 28, 2015 at 8:01 am #198415I have the same issue on another my site but now with gallery categories
how it looks: http://kovka-ug.ru/katalog/kovanye-vorota-kalitki-zabory/
gallery categories page in admin: http://prntscr.com/7xvagh
How to display cirylic names?July 28, 2015 at 10:41 am #198492Hi,
I need wordpress admin login detail to check and resolve the issue.
Thanks
MohammadJuly 28, 2015 at 10:46 am #198493This reply has been marked as private.July 28, 2015 at 12:53 pm #198539Hi,
I tried to edit files but dont get any changes. Are you using any cache mechanism?
Thanks
MohammadJuly 28, 2015 at 1:00 pm #198543Even if I used I do not know about it. May be it has conflict with other plugins? By the way , this problem arose after I updated the JOYN and swift framework before everything worked as it should.
July 28, 2015 at 2:35 pm #198576Hi,
I have resolved the issue so please check. I have pasted given below code at functions.php file.function sf_gallery_filter( $style = "basic", $parent_category = "" ) { $filter_output = $tax_terms = ""; if ( $parent_category == "" || $parent_category == "All" ) { $tax_terms = sf_get_category_list( 'gallery-category', 1, '', true ); } else { $tax_terms = sf_get_category_list( 'gallery-category', 1, $parent_category, true ); } $filter_output .= '<div class="filter-wrap clearfix">' . "\n"; $filter_output .= '<ul class="post-filter-tabs filtering clearfix">' . "\n"; $filter_output .= '<li class="all selected"><a data-filter="*" href="#"><span class="item-name">' . __( "Show all", "swiftframework" ) . '</span></a></li>' . "\n"; foreach ( $tax_terms as $tax_term ) { $term = get_term_by( 'name', $tax_term, 'gallery-category' ); if ( $term ) { $filter_output .= '<li><a href="#" title="View all ' . $term->name . ' items" class="' . $term->slug . '" data-filter=".' . $term->slug . '"><span class="item-name">' . $term->name . '</span></a></li>' . "\n"; } else { $filter_output .= '<li><a href="#" title="View all ' . $tax_term . ' items" class="' . $tax_term . '" data-filter=".' . $tax_term . '"><span class="item-name">' . $tax_term . '</span></a></li>' . "\n"; } } $filter_output .= '</ul></div>' . "\n"; return $filter_output; }
Thanks
MohammadJuly 28, 2015 at 2:39 pm #198579Thank you for support, it was really quick=)
July 28, 2015 at 2:41 pm #198581Hi,
You most welcome.
Thanks
Mohammad -
Posted in: Joyn
You must be logged in and have valid license to reply to this topic.