Tagged: outside, Shortcodes, Template Builder
-
AuthorPosts
-
April 8, 2019 at 1:13 pm #1088255
hi guys, as i use this function for customization of our systems, my question is:
is there any possibility to turn this of by functions.php ?i can go in detail later, if we do not find a simple solution…
greez
reneApril 9, 2019 at 7:00 am #1088550Hi Rene,
I’m not sure I understand your question, could you try clarify or explain a bit further please?
Best regards,
RikardApril 9, 2019 at 10:34 am #1088622hi rikard,
in version 4.5.5 you changed. “fixed: an issue with shortcodes used outside of template builder pages”
as we design our own shortcodes based on avia and load a script via ajax which uses WP functionality, our scripts do not work anymore.
if we try to fix this with a small extension like so:$avia_config[‘template’] = “avia-blank”;
$avia_config[‘conditionals’][‘is_builder_template’] = true;
get_template_part(‘template-builder’);our output gets now visible again, but mostly all JS functionalities are broke. another problem is that we now have the header and breadcrump output, which we dont want. everything worked fine with the version 4.5.3, so we are sure all this is caused by the 4.5.4 update and the “issue with shortcodes used outside of template builder pages”.
so, if possible, is there some possibility to “fix” this for us via something like an avia_config Parameter?
cheers
rene- This reply was modified 5 years, 8 months ago by isee.
April 15, 2019 at 5:16 pm #1091019Hi,
Try to update:
enfold/config-templatebuilder/avia-template-builder/php/shortcode-template.class.php
and enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.php
This fixes some problems with functionality for REST API, feed, …
Check the well documented filters in function shortcode_handler_prepare in shortcode-template.class.php.
Make sure to enqueue your scripts in function extra_assets() as we do for our shortcodes (if your shortcodes are derived from aviaShortcodeTemplate). This adds your scripts to the header.
Or try to hook into ‘wp_head’ action with 1 to add your scripts as one of the first scripts.Best regards,
Günter -
AuthorPosts
- You must be logged in to reply to this topic.