![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
-
AuthorPosts
-
March 22, 2017 at 6:01 pm #764934
Hi
I find that tip and I want to apply it in child theme to avoid overwrite changes after next update.
I am not shure about proper way to make changes.
Should I create in child theme folder empty folders config-templatebuilder where I will place avia-shortcodes files with changes?
Thank you in advanced
KrzysztofMarch 22, 2017 at 6:19 pm #764956Hey Krzysztof,
Yes, you would basically recreate the parent structure in the child theme.
Best regards,
Jordan ShannonMarch 22, 2017 at 7:31 pm #765005Hi Jordan
Thank you, but I find another issue:-)
What I am going to do?
I wan to change Icon list titles from H4 to H3 for SEO purpouse.
I find file iconlist.php in \enfold\config-templatebuilder\avia-shortcodes\iconlist.php then I changed in that file
old code$title_el = "h4"; $iconlist_title = ""; if($this->iconlist_styling == "av-iconlist-small") { $title_el = "div"; $iconlist_title = "_" . "small"; }
to
$title_el = "h3"; $iconlist_title = ""; if($this->iconlist_styling == "av-iconlist-small") { $title_el = "div"; $iconlist_title = "_" . "small"; }
But I see that iconlist titles are still H4 How I can change it?
BR
Krzysztof-
This reply was modified 7 years, 5 months ago by
Krzysztof.
March 23, 2017 at 12:41 am #765116Hi,
Please try clearing your cache a few times and reload the page.
Best regards,
Jordan ShannonMarch 23, 2017 at 6:07 pm #765616Hi
I cleared cache several time and still see H4.
Here is screenshot
I have checked also with another browser and it is the same.
I also make this changes directly in main theme but it is something wrong.
Can you check again?
BR
KrzysztofMarch 23, 2017 at 6:16 pm #765619Hi,
That is the correct file. Are you making sure the it is the correct file folder for the main theme. I have tested this on my system and it updates with no issue at all. If possible please provide ftp access so I can look into this.
Best regards,
Jordan ShannonMarch 23, 2017 at 6:34 pm #765641Hi
Yes, please find in privat area. It looks like when I added to main theme it works, but when I try to change in child theme I made a mistake.
BR
KrzysztofMarch 23, 2017 at 6:44 pm #765651how do you garantee that the child-theme shortcode was taken?
i hold the same structure when i want to replace a shortcode.
So my subfolder is the same name (shortcodes) in Child-Theme folder and than i put in functions.php of child-theme the following: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; }
March 23, 2017 at 6:54 pm #765661Hi,
Yes, please try Guenni007’s above suggestion. Make sure you replicate the same structure as the parent theme.
Best regards,
Jordan ShannonMarch 23, 2017 at 8:10 pm #765707does that code work anymore? because allthough the the new shortcodes are seen in Dashboard Editor the changings have no influence any more – if i overwrite the original file it works as Krzysztof said
i have installed on that testinstallation Enfold 4.0.3
-
This reply was modified 7 years, 5 months ago by
Guenni007.
March 24, 2017 at 8:21 am #765982March 24, 2017 at 8:33 am #765988i solved this – download go ahead.
-
This reply was modified 7 years, 5 months ago by
Guenni007.
March 24, 2017 at 10:23 am #766022I have added that code to functions.php of child-theme. But it doesn’t work.
I’ve created 2 folders in enfold-child theme: config-templatebuilder/avia-shortcodes/ and here i placed iconlist.php file with changes
It is right?
BR
KrzysztofMarch 24, 2017 at 1:20 pm #766129that is to complex the line in the code :
array_unshift($paths, $template_url.'/shortcodes/');
gives the folderstructure :just a folder “shortcodes” (or in case to replace a script “js” ). and in it the files – but as i described above since 4.0.3 this “half-worked”
The new files are loaded to dashboard – appearance – editor. but the changings of those files has no influence.
When i overwrite the original by the new one – changings take place. So i’m now a bit helpless too!-
This reply was modified 7 years, 5 months ago by
Guenni007.
March 24, 2017 at 2:08 pm #766174March 24, 2017 at 2:37 pm #766202Hi
Thank you
Link for download is not proper, can you check?March 24, 2017 at 2:54 pm #766218Sorry : try again please Download
and for the moment overwrite the original file in Enfold Folderssee. Resultpage: https://webers-testseite.de/kokon/elements/icon-list/
March 27, 2017 at 6:08 am #767198Hi,
I think having an “h1” option is not a bad idea. The user will have an option to add a single item in the icon list element and set the heading to “h1” if he chose to use that element as the page title. Anyway, thanks for the help as always.
Best regards,
IsmaelMarch 27, 2017 at 11:17 am #767337Hi
Thank you for your help.
Sorry but I am not sure what I need to do.
I insert 2 files to enfold-child/config-templatebuilder/avia-shortcodes/here
When I checked nothing is changed
Whers is my mistake?Because I previous created a lot of pages now I don’t need to have choice I need only to change H4 to H3 on whole iconlist on the page.
BR
KrzysztofMarch 28, 2017 at 3:55 am #767837March 28, 2017 at 8:25 am #767953in icon-box.php you could choose the h1 but in the list all listpoints get that h1 – so a multiple h1 on page.
But it is easy to add this option as you know. just add in that array the h1 option"subtype" => array("H1"=>'h1',"H2"=>'h2',"H3"=>'h3',"H4"=>'h4',"H5"=>'h5',"H6"=>'h6')
March 28, 2017 at 8:30 am #767955on line 443 of icon-list.php there is the code:
$title_el = "h4";
change it to$title_el = "h3";
save the icon-list.php and upload it to your child-theme/shortcodes folder (on Enfold 4.0.3 the overwriting of shortcodes through child-theme files does not work as before – it is on 4.0.4. ok again) so put in child-theme functions.php :
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; }
but ! i don’t know if allready placed iconlist will change than to h4. Definitly new placed or edited will do.
March 28, 2017 at 8:46 am #767966Hi
Thank you for explanation, how works great!
Last question: should I copy whole oryginal file icon-list.php into child theme and make a changes in it?
If in new version in the Future will be some changes in that files, this changes overwrite oryginal file?
Thank you again!
BR
KrzysztofMarch 28, 2017 at 9:04 am #767977yes that is the way – a copy to child-themes/shorcodes folder and than edit this copy.
if they are in child-theme folder they will not be overwritten – but you are right if there are fundamental changings in a shortcode of an updated Enfold Parent Theme you won’t come into joy of these new features, because Enfold will than load the child-theme shortcode.
But! usually there might be new shortcodes (as now Tab-Section) but very unlikely changings to existing shortcodes.-
This reply was modified 7 years, 5 months ago by
Guenni007.
March 28, 2017 at 9:09 am #767983Great
Thank you again
It was very helpfull!
KrzysztofMarch 30, 2017 at 12:13 am #769190Hi!
in icon-box.php you could choose the h1 but in the list all listpoints get that h1 – so a multiple h1 on page.
Yes, it’s true but you can also remove the other items in the list and leave a single item then use it as the page title.
Best regards,
IsmaelAugust 16, 2024 at 12:19 pm #1464768Is this still working to use the custom files in the config template builder?
function avia_include_shortcode_template($paths){ $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; } add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
August 16, 2024 at 4:34 pm #1464785Hi,
This is only for items in the /avia-shortcodes/ directory and you must add the code to your child theme and add a /shortcodes/ directory to your child theme, please see our documentation here. If the page doesn’t scroll automatically, scroll to Add Elements to ALBBest regards,
Mike -
This reply was modified 7 years, 5 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.