Forum Replies Created

Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • in reply to: Optimizing images: Should I use more than 1 version? #1228293

    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
    Stephan

    in reply to: Optimizing images: Should I use more than 1 version? #1225193

    and 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…

    in reply to: Optimizing images: Should I use more than 1 version? #1224655

    I suppose that it is not working with alb elements.

    in reply to: Optimizing images: Should I use more than 1 version? #1224505

    Almost 1 year ago you wrote this:

    August 7, 2019 at 11:05 am
    Ismael
    Moderator

    Hi,


    @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,
    Ismael

    in reply to: Optimizing images: Should I use more than 1 version? #1222931

    to 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.

    in reply to: Enfold – Upcoming fixes #1190789

    Responsive images are crucial for modern themes and should be implemented years ago…

    in reply to: Enfold – Upcoming fixes #1184203

    anything new about srcset attribute?

    in reply to: Optimizing images: Should I use more than 1 version? #1183839

    Hey Victoria,
    is there something new about that feature?
    Will it be implemented in the next version?

    Best regards,
    Stephan

    in reply to: Custom Advanced Layout Builder Elements #1149173

    I appreciate your work. It is great.
    A woocommerce product card would be nice. I like the movie card

    Yes anywhere. Should work.
    Are you sure nothing happens? Did you check source code?

    In functions.php of your child theme.

    in reply to: Optimizing images: Should I use more than 1 version? #1136000

    Hey Ismael,
    is there something new about that feature?
    Will it be implemented in the next version?

    Best regards,
    Stephan

    in reply to: Do_shortcode doesn't work anymore #1135999

    Hey Nikko,

    thank you. Works!

    Best regards
    Stephan

    in reply to: Do_shortcode doesn't work anymore #1134830

    Hey 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,
    Stephan

    I 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.

    in reply to: Add font-display to entypo-fontello and custom fonts #1134741

    I 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.

    in reply to: Optimizing images: Should I use more than 1 version? #1125086

    puhh 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
    in reply to: Do_shortcode doesn't work anymore #1116027

    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 content

    and 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
    Stephan

    in reply to: Do_shortcode doesn't work anymore #1115543

    puhhh…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 )

    in reply to: Do_shortcode doesn't work anymore #1115313

    Hi Yigit,
    I’m using 4.5.7

    Best regards
    Stephan

    in reply to: Do_shortcode doesn't work anymore #1115069

    This 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?

    in reply to: Do_shortcode doesn't work anymore #1115067

    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
    Stephan

    Hey 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
    Stephan

    in reply to: Do_shortcode doesn't work anymore #1115006

    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='']");

    For example this code. It is not working in plugin context. The shortcode won’t be processed.

    maybe some one can help me.
    I try it on another way. Is there on developer site a possibility to call alb in php dynamically?

Viewing 25 posts - 1 through 25 (of 25 total)