New Landing How can we help? Themeforest Theme Support Dante Translate or edit "ALL" in portfolio filter?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #121819
    BallouHosting
    Member
    Post count: 94

    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

    #121904
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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
    Mohammad

    #121913
    BallouHosting
    Member
    Post count: 94

    This is great. Thank you, it worked!
    Best regards

    #121915
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome. I’m glad that issue resolved.
    Thanks 🙂
    With Best Regards
    Mohammad

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register