Tagged: , ,

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #170992

    There was another thread on this that has been closed : http://www.kriesi.at/support/topic/accordion-hide-all-category/#post-133938

    Finally got around to trying Kriesi’s advice, but it didn’t work :( I think perhaps because of the 2.3 update?

    In any case, I’ve pasted the following function into my child theme’s functions.php, but I might have missed something.

    Any thoughts?

    #171476

    Hi Michae1!

    The filter on thread is for the portfolio sort. You can change the “All” text for the accordion element by editing config-templatebuilder > avia-shortcodes.php > toggles.php. Find this code on line 233:

    $tag_string = "{".__('All','avia_framework' )."} ";

    Best regards,
    Ismael

    #171493

    Hi Ismael,

    Thanx. I’ve changed that already. But Kriesi had a dynamic fixed in the thread above that I could use in my child theme functions.php, so it wouldn’t revert back with every new update. However, that didn’t seem to work properly, likely because of the latest 2.3 update. Was hoping for a similar fix if possible.

    Thanx
    - Michael

    #172139

    Hello!

    Please try following code instead

    
    add_filter('avf_portfolio_sort_first_label','avia_change_label', 10, 2);
    function avia_change_label($all, $params)
    {
    $all =  "Name of your label";
    return $all;
    }
    

    and replace “Name of your label” with your custom text.

    Cheers!
    Peter

    #177747

    Hi Dude,

    I tried your code, but it didn’t seem to work. This is exactly what I have placed in my child themes functions.php

    <?php
    
    add_filter('avf_portfolio_sort_first_label','avia_change_label', 10, 2);
    
    	function avia_change_label($all, $params)
    	{
    		$all =  "Name of your label";
    		return $all;
    	}

    The “General Questions” (which I hardcode renamed in the php from “all”) is the one that SHOULD be changing with this function.

    http://bit.ly/1bBpSLc

    What am I doing wrong?

    #178009

    Hey!

    I just noticed that Kriesi did not add the filter to the accordion function but it will only affect the portfolio filter. I’ll ask him to add it to the accordion function too.For now you need to modify /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/toggles.php directly and replace following line

    
    $start = array(__('All','avia_framework' ) => true);
    

    with

    
    $start = array();
    

    Regards,
    Peter

    #178246

    So, I’m definitely doing SOMETHING wrong, because replacing the above code caused the entire body of the page to not render :(

    #179569

    Hey!

    Please update to the latest version of Enfold (released yesterday) and add following code to the functions.php file to change the label:

    
    add_filter('avf_toggle_sort_first_label','avia_change_toggle_label', 10, 2);
    
    	function avia_change_toggle_label($all, $params)
    	{
    		$all =  "Name of your label";
    		return $all;
    	}
    

    Cheers!
    Peter

    #181924

    Hi Peter, that worked great! Thanx!!

    Is there a similar hook for the separator? I’d like to change it from “/” to “|” and change the color. Hope so :)

    #181970

    Hey!

    I did not test it but you can try to overwrite the default separator with following css code

    
    #js_sort_items .text-sep:after { content: "|"; }
    #js_sort_items .text-sep{ display: none; }
    

    Insert it into the quick css field.

    Regards,
    Peter

    #182813

    No luck there, Peter. Any other thoughts? I also tried adding !important, just in case that might override the setting. I was thinking, because this is a character and not just a style change, wouldn’t it have to be changed in the php too, like the above “All” label?

    #183256

    Hey!

    There is no filter for the seperator. You need to manually edit the file again and look for this code on line 269:

    $output .= "<span class='tag-seperator'>/</span>";

    Best regards,
    Ismael

    #193653

    Thanx Ismael. Was hoping for a dynamic solution so my client wouldn’t have to change this in the php every time they update.

    Could you point me in the right direction of adding a function to my child functions.php that might do this?

    Was trying to look around for how/where the “All” tag is able to be changed dynamically with Peter’s function. Couldn’t I adapt that function to do the same thing for the separator?

    #193696

    Hi!

    I’m not sure if this is possible with a child theme. I’ll ask Dude.

    Best regards,
    Ismael

    #193741

    Cool. Thank you, Ismael. Look forward to hearing the solution.

    #193759

    Hi!

    The only way to change the separator with a child theme would be to overwrite the entire portfolio shortcode file. Crreate a “shortcodes” folder within the child theme directory, then copy the /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/portfolio.php into the child theme “shortcodes” folder and modify the code based on Ismaels instructions (see last post). Then add following code into the child theme functions.php file

    
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
    	$template_url = get_stylesheet_directory();
        	array_unshift($paths, $template_url.'/shortcodes/');
    
    	return $paths;
    }
    

    It will make sure the the shortcode file of the child theme is loaded first and you can overwrite the parent theme files.

    Best regards,
    Peter

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

The topic ‘Customize Accordion Sortable "All" Tag’ is closed to new replies.