Forum Replies Created
-
AuthorPosts
-
The srcset option has been put on hold for other priorities, but rest assured that you will still be able to fully optimize the site without it. Please check this article for more info.
// https://kriesi.at/archives/scoring-100-100-in-google-pagespeed-insights-gtmetrix-pagespeed-and-yslow
You can repeat it, but that won’t make it true either.
I would be very happy if Kriesi or another developer take a look at it.
Best regards
Stephanand it is so easy to implement it in the various elements. I don’t get it why you need so much time for such a crucial feature.
In my eyes this missing feature destroys enfolds reputation of being a modern and seo friendly theme.
The wordpress srcset implementation covers only a small part of it, but atleast it does something.If you use the advanced layout builder with enfold, not even the simple wordpress implementation is supported. Enfold makes it worse and thats really bad…
I suppose that it is not working with alb elements.
Almost 1 year ago you wrote this:
August 7, 2019 at 11:05 am
Ismael
ModeratorHi,
@ramotzkie: The dev team is currently working on the srcset attribute feature. A beta version is available, but it’s still under improvement. We might not be able to release it in the upcoming patch, but hopefully we can in the next.Best regards,
Ismaelto fully optimize the site without it.
With all due respect, but this statement is either a lie or you really don’t realize how important this feature is. The use of srcset-attribute would improve site speed, no matter what these tools say.
All the alb-elements should support it and I do not understand why it is such a big deal to implement it.
Responsive images are crucial for modern themes and should be implemented years ago…
anything new about srcset attribute?
February 12, 2020 at 12:45 pm in reply to: Optimizing images: Should I use more than 1 version? #1183839Hey Victoria,
is there something new about that feature?
Will it be implemented in the next version?Best regards,
StephanI appreciate your work. It is great.
A woocommerce product card would be nice. I like the movie cardSeptember 12, 2019 at 4:28 am in reply to: Google PageSpeed: lange Ladezeiten von Ressourcen/Fonts (entypo-fontello.woff) #1137347Yes anywhere. Should work.
Are you sure nothing happens? Did you check source code?September 11, 2019 at 4:00 pm in reply to: Google PageSpeed: lange Ladezeiten von Ressourcen/Fonts (entypo-fontello.woff) #1137085In functions.php of your child theme.
September 9, 2019 at 1:43 pm in reply to: Optimizing images: Should I use more than 1 version? #1136000Hey Ismael,
is there something new about that feature?
Will it be implemented in the next version?Best regards,
StephanHey Nikko,
thank you. Works!
Best regards
StephanHey Nikko,
did you get an answer? I’m still believing that it is unwanted behavior and there should be a check if the call is coming from an ajax call.
Best regards,
StephanSeptember 6, 2019 at 6:32 am in reply to: Google PageSpeed: lange Ladezeiten von Ressourcen/Fonts (entypo-fontello.woff) #1134742I found the following solution:
add_filter('avf_font_display', function($swap) { return 'swap'; }, 10, 1); add_filter('avf_google_fontlist', 'add_font_display'); function add_font_display ($fonts) { return $fonts.='&display=swap'; }
Second one is if you load google fonts in footer via javascript.
September 6, 2019 at 6:31 am in reply to: Add font-display to entypo-fontello and custom fonts #1134741I found the following solution:
add_filter('avf_font_display', function($swap) { return 'swap'; }, 10, 1); add_filter('avf_google_fontlist', 'add_font_display'); function add_font_display ($fonts) { return $fonts.='&display=swap'; }
Second one is if you load google fonts in footer via javascript.
August 6, 2019 at 12:30 pm in reply to: Optimizing images: Should I use more than 1 version? #1125086puhh I tried to implement some responsive images techinques in my website and I was literally shocked when I found out that enfold does not support srcset attribute.
Responsive images are crucial nowadays and the wordpress srcset implementation covers only a small part of it. But atleast it covers a part. In marked contrast to enfold…
This is really something a modern theme should contain. Some of my bigger websites run enfold. I’m not sure if I would buy it again if I’ve knew that before.Best regards
Stephan- This reply was modified 5 years, 4 months ago by ramotzkie. Reason: forget greeting
Hi Nikko,
Ajax call
(function ($) { $.ajax ({ url: "/wp-admin/admin-ajax.php", type: "GET", dataType: "JSON", data: { action:"add_myfunc", post_id: '.$atts['snippet'][0].', meta_id: '.$atts['snippet'][1].' }, success: function (resp) { if (resp.success) { // success } else { console.log ("Error: " + resp.data) ; } }, error: function (xhr, ajaxOptions, thrownError) { console.log ("Request failed: " + thrownError.message) ; }, }) ; })(jQuery) ;
load shortcode and process it
function load_snippet($post_id, $meta_id) { global $wpdb; $snippet = $wpdb->get_row("SELECT * FROM ".$wpdb->prefix."postmeta WHERE post_id = '".$post_id."' AND meta_id = '".$meta_id."'" , OBJECT ); $meta = preg_replace('#\{{{(.*?)\}}}#m', "", $snippet->meta_value); wp_send_json_success (do_shortcode($meta)); }
The shortcode processing is located in shortcode_handler_prepare function in enfold/config-templatebuilder/avia-template-builder/php/shortcode-template.class.php line 341
Please have a look at the function. I can’t find a hook which helps me.
Condition! is_admin()
returns false because ajax request are always made from backend.Later there is a comment in source code:
/**
* In backend we return the shortcode as self closing shortcode only as we might have no reliable info about contentand later another one:
//dont use any shortcodes in backend
Therefore I came to the conclusion that the first part of the function should handle ajax calls as well (but isn’t because of admin context) and the if conditions should be
if((wp_doing_ajax() || !is_admin()) && ! Avia_Builder()->wp_head_done && ! $no_header_request )
If I change the code in that line everything works like expected.
Do you know another way?
Best regards
Stephanpuhhh…I think I found the problem.
wp_body_open enabled the use of shortcodes in enfold-child/functions.php – that worked
In my plugin I tried to execute a shortcode via ajax call. wp_body_open hadn’t any effect. Ajax calls are always made from backend perspective and the following line killed the shortcode execution:
enfold/config-templatebuilder/avia-template-builder/php/shortcode-template.class.php line 398
if(! is_admin() && ! Avia_Builder()->wp_head_done && ! $no_header_request )
Should ask if there is a ajax call:
if((wp_doing_ajax() || !is_admin()) && ! Avia_Builder()->wp_head_done && ! $no_header_request )
Hi Yigit,
I’m using 4.5.7Best regards
StephanThis is my enfold-child/functions.php
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ echo do_shortcode("[av_button label='Klick mich' link='' link_target='' size='small' position='center' label_display='' icon_select='yes' icon_hover='' icon='' color='theme-color' custom_bg='#444444' custom_font='#ffffff' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av_uid='']"); echo do_shortcode('[caption id="attachment_6" align="alignright" width="300"]<img src="https://img-lumas-avensogmbh1.netdna-ssl.com/showimg_dre14_desktop.jpg" alt="Kanagawa" title="The Great Wave" width="300" height="205" class="size-medium wp-image-6" /> The Great Wave[/caption]');
First shortcode isn’t processed. Second shortcode is.
Where is the difference?Hi Nikko,
doesn’t help :(
I knew it worked some enfold versions ago. I don’t know what changed.What happens if you try to execute the above php code in your child theme functions.php? Does it work?
Best regards
StephanJuly 2, 2019 at 6:05 am in reply to: Add Layout Builder to every editor element in a custom post type #1115036Hey Ismael,
thank you for your answer. I can add the builder shortcodes manually. That works, but is not really comfortable.
So there is no way to load the builder manually in a plugin?Best regards
Stephanecho do_shortcode("[av_button label='Klick mich' link='' link_target='' size='small' position='center' label_display='' icon_select='yes' icon_hover='' icon='' color='theme-color' custom_bg='#444444' custom_font='#ffffff' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av_uid='']");
For example this code. It is not working in plugin context. The shortcode won’t be processed.
July 1, 2019 at 5:13 am in reply to: Add Layout Builder to every editor element in a custom post type #1114779maybe some one can help me.
I try it on another way. Is there on developer site a possibility to call alb in php dynamically? -
AuthorPosts