This topic has 6 replies, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #62847
     ozzyintheloft
    Participant

    Hi There

    How can I change the portfolio parent category name “All” to something else?

    i.e “Screenshots” or something else

    Many thanks
    Ozzy

    #62981
     sharmstr
    Moderator

    You can either translate it or copy the following function to your child functions.php file

    COPY CODE
    
     function 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #62983
     ozzyintheloft
    Participant

    Thanks 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
    Ozzy

    #62985
     sharmstr
    Moderator

    It 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #63029
     ozzyintheloft
    Participant

    that 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” ??
    thanks

    #63031
     sharmstr
    Moderator

    I 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #63033
     sharmstr
    Moderator

    But… 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 solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?