Forum Replies Created
-
AuthorPosts
-
Hi,
You have to add all parameters to the add_filter function, otherwise it uses default parameters (where last one is 1):
add_filter('avf_magazine_header_content', 'avf_magazine_header_content_custom_query', 10, 2 );
Best regards,
GünterHi @Guenni007,
I modified the filter parameters (see line 973ff).
You can use this filter now like:
function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ) { if( 'avia_slideshow' == $context ) { // get class of slideshow $slider_class = get_class( $extra_args[2] ); if( in_array( $slider_class, [ 'avia_sc_slider', 'avia_sc_slider_fullscreen', 'avia_sc_slider_full' ] ) ) { $index = $extra_args [1]; // current slide in loop $slide = $extra_args [3]; // get shortcode attributes of current slide $attr = $slide['attr']; // only change for first slide and when default if( '' == $attr['heading_tag'] && 0 == $index ) { $args['heading'] = 'h3'; } } } return $args; } add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
… only ever replace the “default setting” ….
It gives more flexibility e.g. if there is dynamic created content on the page (e.g. like in upcoming 6.0 with ACF fields and/or in custom layouts )
Best regards,
GünterHi,
$extra_args[1] = ‘slider_title’ | ‘slider_entry’
see lines 1096, 1182 ff
Best regards,
GünterHi @Guenni007,
see line 1117 ff
In filter use:
$element_atts = $extra_args[4];
and for styling:
$element_atts['iconlist_styling'] // '' | 'av-iconlist-small'
Best regards,
GünterHi,
avia_sc_iconlist
correct – currently not possible. I will add the attributes of “container” element to $extra_args. Will let you know here.
avia_sc_content_slider
it is avia_content_slider
Best regards,
GünterHi @Guenni007,
In my solution I leave the filter right away if not ‘avia_sc_toggle’ avoiding copying of $extra_args [1] if not needed (arrays are copied and not only a reference to it).
Your solution is also OK. Depending on what you want to do or what other logic you need in this filter (e.g. for other elements) there are always different approaches.
Best regards,
GünterHi @Guenni007,
I added a fix for 5.7:
LIMITATION: relation “AND” does not provide a fallback if empty categories are selected !!!
Best regards,
GünterHi @Guenni007,
Sorry for the late reply.
function my_avf_customize_heading_settings(array $args, $context, array $extra_args = array()) { if( $context != 'avia_sc_toggle' ) { return $args; } $atts = $extra_args [1]; if( '' == $atts['heading_tag'] ) { $args['heading'] = 'h3'; } return $args; } add_filter('avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3);
$atts['heading_tag']
is the value of the selectbox “Toggle Title Tag (Theme Default is <p>)”
Best regards,
GünterHi @Guenni007,
strict equality
No, not needed.
p-tag
You need to check $extra_args. In the ALB element you find:
$extra_args = array( $this, $atts, $content, 'title' );
means you can use:
$atts = extra_args [1];
and you have access to all shortcode attributes – if you set a custom id or class you can check it here.
Best regards,
Günter- This reply was modified 8 months, 4 weeks ago by Günter.
Hi @BigBatT,
Thank you a lot again for contributing the translations. Will be added to core.
Have a great day.Best regards,
GünterMarch 25, 2024 at 1:27 pm in reply to: The “avia-head-scripts” error persists despite trying all recommendations #1438275Hi,
To find the entry in database you can use the following SQL statement:
SELECT * FROM
wp_options
WHEREoption_name
like '%avia-head-script%'To remove all use:
DELETE FROM
wp_options
WHEREoption_name
like '%avia-head-script%'Best regards,
GünterHey Tim,
Thanks for reporting this. There is a weak CSS selector for empty cells in table.css line 234:
.pricing-table li.empty-table-cell{ display:none; }
As a temporary fix change it to or add it to Quick CSS in theme options:
.avia-pricing-table-container .pricing-table li.empty-table-cell{ display:none; }
Do not forget to toggle and save theme options to rebuild the merged CSS files.
I will add a fix for next release.
Best regards,
GünterHi,
I thought based on topic title you are using a plugin.
I’ve changed the implementation that this “feature” must be activated by user in child theme functions.php:
add_theme_support( 'avia_include_cookiebot' );
As there are too many files involved I would like to send you a complete copy of the theme to check. Let me know, to which E-Mail I can mail it please.
Best regards,
GünterHi Jan,
I’ve changed the implementation and put the relevant code js and php in config-cookiebot folder.
I think you are using https://wordpress.org/plugins/cookiebot/ – I added logic to only load the files when this plugin is active.
I would prefer to send you a complete version of Enfold (based on 5.6.11) including this implemention if you let me know where to send it (add it to private content field).
Best regards,
GünterMarch 18, 2024 at 2:25 pm in reply to: Bug Enfold Image element doesnt work and causes php memory exausted error #1437481Hi,
No problem – it will also take me some time to investigate.
I’m tagged to this topic.Best regards,
GünterHi,
Thank you for reporting this problem.
I completly modified the error handling in function avia_backend_create_file() for next release.
But in my opinion using WP-Rocket and our file merging does not make much sense. WP-Rocket is as far as I know optimized to handle caching and also minifying.
You can use our minimized css and js files without merging if you like.
Best regards,
GünterMarch 18, 2024 at 12:05 pm in reply to: Bug Enfold Image element doesnt work and causes php memory exausted error #1437463Hi,
Sorry for the late reply.
Do you have any other error messages in the error logs of WP and the php server ?
You probably know, but just to be sure.
There are 2 memory limits to set: PHP and WP
https://www.atatus.com/blog/the-php-memory_limit-what-you-need-to-know-about-increasing-it/
As you investigated – it seems to be a problem of PHP 8.1 in conjunction with a large amount of images.
There are 2 possible problems:
– caused by our image element
– caused by WooCommerce core or a plugin you usePHP 8.1 also has a stricter type management – this also might cause a problem somewhere.
It is impossible for us to setup a test site with 116.000 products and to debug the problem on a live site is not really possible without breaking the site as we would need to insert debug code and also change php code of the image element including frontend output to locate the problem.
Do you have a chance to duplicate the site to a dev server where we can get free access (also ftp, to error logs, …) to investigate closer?
Best regards,
GünterHey Perfect Word,
Thanks a lot for reporting. Will be added to next release 5.6.13.
Enjoy the theme and have a great day.
Best regards,
GünterHey kreativeseite,
Very sorry for this problem. Will be fixed in next release.
Meanwhile can you please replace
…\wp-content\themes\enfold\config-templatebuilder\avia-shortcodes\section\section.php
with
I added at line 1495:
$skipSecond = false;
Do not forget to make a backup of the original file for a fallback and clear server and browser cache.
If you need help with this let us know.Best regards,
GünterHey Jan,
I tried to add a solution with WP filter – that would be a solution to maintain code in one place and also for other plugins to hook.
If you could please test it before we add it to final core.
1.) replace enfold\js\avia-js.js with
https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_5_6_10/js/avia.jshttps://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_5_6_10/js/avia-js.js
Check class aviaJSHelpers in this file.
2.) in the files you mentioned instead of your code add:
// allow 3-rd party plugins to hook (see enfold\js\avia-js.js aviaJS.aviaJSHelpers) if( window['wp'] && wp.hooks ) { allow_continue = wp.hooks.applyFilters( 'aviaCookieConsent_allow_continue', allow_continue ); }
3) To load WP hook js in enfold\functions.php around line 574:
wp_enqueue_script( 'avia-js', "{$template_url}/js/avia-js{$min_js}.js", array(), $vn, false );
replace with:
wp_enqueue_script( 'avia-js', "{$template_url}/js/avia-js{$min_js}.js", array( 'wp-hooks' ), $vn, false );
Thank you for checking in advance and your help.
Regards,
GünterHi,
I added filter avf_sc_section_before_close at line 1507ff.
Complete file with modification:
Let me know if this helps you.
Will be in next release.
Best regards,
GünterHi Patrick,
Sorry for the late reply.
Als Kommunikationskanal ist möglich: https://github.com/KriesiMedia/Enfold-Feature-Requests/issues
Für Anregungen und Wünsche sind wir jederzeit offen und dankbar – soferne diese für andere User Sinn ergeben, werden sie gerne berücksichtigt.
Filter im core einzubauen ist jederzeit möglich. Gib uns einfach Bescheid, wo genau.
Deine Änderungen oben habe ich einmal in Vormerk genommen – konnte aber noch nicht genauer drüberschauen.
Best regards,
GünterHi @Webvriend,
Best regards,
GünterHi,
Enfold 6.0 including the features mentioned before is on the roadmap close to release. We still do testing and are working on the docu for it.
A final release date cannot be said at the moment.
Best regards,
GünterFebruary 10, 2024 at 3:34 pm in reply to: How do I customize the icons displayed in the Icon List? #1433913Hi Rob,
Fix will be in next release 5.6.11. Icons will be below title before content field.
Best regards,
GünterJanuary 30, 2024 at 8:29 am in reply to: Metadata element – possible to add default settings? #1432460 -
AuthorPosts