-
Author
-
June 15, 2015 at 12:52 #62847ozzyintheloftParticipant
Hi There
How can I change the portfolio parent category name “All” to something else?
i.e “Screenshots” or something else
Many thanks
OzzyJune 15, 2015 at 21:21 #62981sharmstrModeratorYou can either translate it or copy the following function to your child functions.php file
COPY CODEfunction kleo_portfolio_filter( $parent_category = "", $exclude_categories = array() ) { $filter_output = $tax_terms = ""; if ( $parent_category == "" || $parent_category == "all" ) { $tax_terms = kleo_get_category_list( 'portfolio-category', 1 ); } else { $tax_terms = kleo_get_category_list( 'portfolio-category', 1, $parent_category ); } $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 href="#"><span class="item-name">'. __("Screenshots", "kleo_framework").'</span></a></li>'. "\n"; foreach ($tax_terms as $tax_term) { $term = get_term_by('name', $tax_term, 'portfolio-category'); if ( $term && ! in_array( $term->term_id, $exclude_categories ) ) { $filter_output .= '<li><a href="#">slug . '"><span class="item-name">' . $term->name . '</span></a></li>'. "\n"; } } $filter_output .= '</ul></div>'. "\n"; return $filter_output; }
I strongly suggest translating it.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 15, 2015 at 21:28 #62983ozzyintheloftParticipantThanks very much for this.
If it’s not too much trouble, would you mind explaining the translate route – I think it involves swapping out one of the files in the database doesn’t it? If you can help, would be most grateful – thanks
OzzyJune 15, 2015 at 21:39 #62985sharmstrModeratorIt doesnt mean that at all. It means building a translation file. Do a search here. Its also in the Kleo doc.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 16, 2015 at 00:23 #63029ozzyintheloftParticipantthat doesn’t really help me at all, sorry. I haven’t worked with translation files before so don’t know which one I am supposed to change to get this end result. Did a search as you suggest and tons of different things came up – most of which didn’t make sense/relevant to me.
On another theme I downloaded, their support showed me where to make the change and how to do it. Can you at least point me in the direction of what bit needs translating exactly. where can I find “All” ??
thanksJune 16, 2015 at 00:46 #63031sharmstrModeratorI just looked at it again and I think it will change all instances of the word all, so just use the code I gave you before that’s already been changed to display “Screenshots”.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
June 16, 2015 at 00:47 #63033sharmstrModeratorBut… You need to make sure that the function hasnt changed after every update.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.