Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Translate or edit "ALL" in portfolio filter?
New Landing › How can we help? › Themeforest Theme Support › Dante › Translate or edit "ALL" in portfolio filter?
- This topic has 3 replies, 2 voices, and was last updated 10 years by Mohammad – SUPPORT.
Viewing 4 posts - 1 through 4 (of 4 total)
-
Posted in: Dante
-
October 21, 2014 at 9:10 am #121819
Hi.
All of our portfolio filters start with the box “All”.
Is there a way to translate it or edit that word to suite our language?Best regards
October 21, 2014 at 11:45 am #121904Hi,
Please insert given below php code at functions.php fo child theme. You can change All text string in this code easily.function sf_portfolio_filter($style = "basic", $parent_category = "") { $filter_output = $tax_terms = ""; $options = get_option('sf_dante_options'); $filter_wrap_bg = $options['filter_wrap_bg']; 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); } if ($style == "slide-out") { $filter_output .= '<div class="filter-wrap slideout-filter row clearfix">'. "\n"; $filter_output .= '<a href="#" class="select"><i class="fa-justify"></i>'. __("Filter our work", "swiftframework") .'</a>'. "\n"; $filter_output .= '<div class="filter-slide-wrap col-sm-12 alt-bg '.$filter_wrap_bg.'">'. "\n"; $filter_output .= '<ul class="portfolio-filter filtering row clearfix">'. "\n"; $filter_output .= '<li class="all selected col-sm-2"><a data-filter="*" href="#"><span class="item-name">'. __("All", "swiftframework").'</span><span class="item-count">0</span></a></li>'. "\n"; foreach ($tax_terms as $tax_term) { $term = get_term_by('slug', $tax_term, 'portfolio-category'); if ($term) { $filter_output .= '<li class="col-sm-2"><a href="#" title="View all ' . $term->name . ' items" class="' . $term->slug . '" data-filter=".' . $term->slug . '"><span class="item-name">' . $term->name . '</span><span class="item-count">0</span></a></li>'. "\n"; } else { $filter_output .= '<li class="col-sm-2"><a href="#" title="View all ' . $tax_term . ' items" class="' . $tax_term . '" data-filter=".' . $tax_term . '"><span class="item-name">' . $tax_term . '</span><span class="item-count">0</span></a></li>'. "\n"; } } $filter_output .= '</ul></div></div>'. "\n"; } else { if ($style == "full-width") { $filter_output .= '<div class="container">'; } $filter_output .= '<div class="filter-wrap row clearfix">'. "\n"; $filter_output .= '<ul class="portfolio-filter-tabs bar-styling filtering col-sm-12 clearfix">'. "\n"; $filter_output .= '<li class="all selected"><a data-filter="*" href="#"><span class="item-name">'. __("All", "swiftframework").'</span><span class="item-count">0</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="View all ' . $term->name . ' items" class="' . $term->slug . '" data-filter=".' . $term->slug . '"><span class="item-name">' . $term->name . '</span><span class="item-count">0</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><span class="item-count">0</span></a></li>'. "\n"; } } $filter_output .= '</ul></div>'. "\n"; if ($style == "full-width") { $filter_output .= '</div>'; } } return $filter_output; }
Thanks
MohammadOctober 21, 2014 at 11:58 am #121913This is great. Thank you, it worked!
Best regardsOctober 21, 2014 at 12:01 pm #121915Hi,
You most welcome. I’m glad that issue resolved.
Thanks 🙂
With Best Regards
Mohammad -
Posted in: Dante
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in and have valid license to reply to this topic.