If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
June 4, 2013 at 4:28 pm #24296
Is there a way to add more content elements in the builder? Hooks or filters that I can tap into with my custom functions file?June 5, 2013 at 7:10 am #123050
You just need to place your element into the wp-contentthemesenfoldconfig-templatebuilderavia-shortcodes folder. The template builder will initialize it automatically.
PeterJune 5, 2013 at 3:01 pm #123051
Thanks for the feedback Peter. But doing this will be written over when the theme is updated correct? I’m using a child theme currently.June 5, 2013 at 4:03 pm #123052
It depends on how you update the theme. If you just overwrite the old files with the new, update files (eg by using ftp) the custom elements won’t be affected (or only if we add a file with the same file name – however the risk is not very high :) ). However if you delete the entire theme folder first you need to make a backup of the elements.
You can also try to place the element code/class into a child theme but I’m not sure if this works out because all elements extend the “aviaShortcodeTemplate” class and if the template builder plugin is not loaded (which can happen because the child theme functions.php will load first) then you’ll probably get an error. In this case I’d recommend to copy the content of functions.php to your child theme and to set the “use_child_theme_functions_only” to “true” (see comment at the top of functions.php).
$avia_config['use_child_theme_functions_only'] = true;June 5, 2013 at 4:11 pm #123053
Thanks again Peter.
That is what I was afraid of. Maybe in the near future making it a bit more extensible with a child theme would be more helpful for some of us not wishing to mess with the main theme files.
Just read the addition to your previous post (adding that is an option) Something I’ll look into.
On that note, maybe there is a way that if the user creates a folder “avia-shortcodes’ in the child theme directory that the theme checks for that folder when the builder is ran and looks for the additional code/classes? Just a thought.
The topic ‘More "Content Elements"’ is closed to new replies.