Forum Replies Created

Viewing 30 posts - 31 through 60 (of 150 total)
  • Author
    Posts
  • Never mind, after trying the hard way, I found this plugin to configure the standard WP sitemaps and easily solve my issues.

    It’s a shame that WP did not include this in the core :-(
    Issue solved with this plugin.
    Rob

    I don’t think splitting into width and height would do much good. For me it’s fine the way it is, very useful. The above was just my lack of proper reading :-)
    I have recently experimented with optimising images “afterwards” (also for the created image sizes), which seems to work well.
    I download all through FTP, run them through FileOptimizer by Javier Gutiérrez Chamorro (Guti) (great app by the way) and then re-upload them. Big size difference.

    Thanks for the code and have a good day!

    Yep, sure… :-)
    File, Date, File Size are blue in the Media Library header and have the arrow. (<span class=”sorting-indicator”>)
    Dimensions (w,h)px], ALT text, Filename are plain black and do not have the little arrow.
    Can’t find in the code where it decides that.
    Thanks for the code, very useful for me!

    Added remark:
    Ahhh…embarassing moment #2 today…
    I misunderstood (not reading closely enough), I thought the dimensions column would be sortable, but it is of coure the File Size column. I better get more sleep (or more coffee). Or better reading skills. :-))
    All fine then, sorry for bothering you.

    Rob

    • This reply was modified 3 years ago by rob2701. Reason: remark added

    Hi Guenni,

    Wow, very nice and useful, thanks! In my installation everything works fine, only thing is the column is not sortable. Is there something I missed?

    Rob

    in reply to: Validity of code to disable Google Maps #1326882

    Hi,

    Just to let you know that your code for the filters to prevent the backend loading of Google Maps and Google Maps API works just fine. They are gone from the backend, thanks! I’m a happy camper. :-)
    I added the one for dequeueing the Google ReCaptcha js as well, and that works fine too:

    // Disable loading of Google ReCaptcha script in theme backend
    add_filter("avf_skip_enqueue_scripts_backend_grecaptcha", function($skip) {
       return "skip_loading";
    }, 10, 1);

    I wish I had found these filters and the proper way to use them earlier, then I wouldn’t have had to waste so much of your time. :-)
    Thanks again for your help and patience and have a good evening (or morning/afternoon/night depending on where you are).

    Solved.

    Rob

    in reply to: Validity of code to disable Google Maps #1326850

    Thanks, you are right about the mistakes and the learning, but it is also about remembering what I learned once before :-)
    I will let you know here after I try them out later tonight.

    in reply to: Validity of code to disable Google Maps #1326844

    Hi Ismael and Guenni,

    Thanks for the tips, great, I will certainly try them out. And I will also try to learn to be more careful and not so hasty when typing filter code :-)
    I always get myself into trouble that way… embarassing.

    Thanks for helping out!

    Rob

    in reply to: Validity of code to disable Google Maps #1326800

    Hi Ismael,

    As usual thanks to you and the rest of the team for your attention and for all the hard work. Much appreciated! And thanks to all for taking a look at this.

    On a related note, when testing several options,I found that these two filter generate warnings, you may also want to look at that. Neither seems to work for the backend, by the way.

    // Google Maps solution after Enfold 4.5.x
    // -- this disables all googlemap scripts handles frontend: avia_google_maps_front_script 
    // -- and backend: avia-google-maps-api, avia_google_maps_api_script 
    add_filter( ‘avf_load_google_map_api_prohibited’, ‘__return_true’ );
    // This disables loading of Google ReCaptcha in the backend
    add_filter( ‘avf_skip_enqueue_scripts_backend_grecaptcha’, ‘__return_true’ );

    Warnings:

    Warning	Use of undefined constant ‘avf_load_google_map_api_prohibited’ - assumed '‘avf_load_google_map_api_prohibited’' (this will throw an Error in a future version of PHP)
    
    Warning	Use of undefined constant ‘avf_skip_enqueue_scripts_backend_grecaptcha’ - assumed '‘avf_skip_enqueue_scripts_backend_grecaptcha’' (this will throw an Error in a future version of PHP)

    Correction:
    My bad! That’s what I get as punishment for not wrapping it in a function… Embarassing…

    Have a good day!
    Rob

    P.S.
    This code from this post still seems to work however:
    https://kriesi.at/support/topic/proper-method-to-disable-google-maps-in-enfold/#post-1186977

    • This reply was modified 3 years ago by rob2701. Reason: Added link to code in pastebin from a post from Nikko
    in reply to: Validity of code to disable Google Maps #1326635

    Hi Ismael,

    Thanks for the info and time. Yes, it’s nice that I can manually take care of it.
    Yes, I need to disable these scripts and the link to Google(!). The same for Google ReCaptcha script.
    Not only are they not needed when not used, they also slow down the backend when Google can’t be reached for some reason.

    That is exactly my point: if I don’t use Google Maps at all, why would Enfold need to validate the API key at all? Same for ReCaptcha.

    I think this is without doubt something that needs to be handled by the general theme settings as well, automatically. When elements are not used, then the associated scripts and styles should not load anywhere, neither frontend nor backend. They should ONLY load when required. Dot.

    You say: the scripts are required in the backend because the theme has to validate the API key, which is needed in order to use the map API. I say NO. The theme doesn’t need to validate the API key, not until I start to choose to use the GMaps element…

    And the same holds true for any other theme component, especially when external / third party..

    Have a good day,

    Rob

    • This reply was modified 3 years, 1 month ago by rob2701.
    in reply to: Validity of code to disable Google Maps #1326547

    Hi,

    To be sure of what I said, I have restored a fresh backup on the DEV website, commented out the Google Maps code in functions.php (lines 538-596) and installed Query Monitor so you can check for yourself. I have disabled compression in the theme for now.

    Without that code Google Maps js is loaded in the admin area. Google ReCaptcha is also loaded in the admin area.
    The options you mentioned earlier in the theme settings work fine, but only for the frontend. In the backend things are like I described here.

    Login info in private window. Thanks for taking a look at this,

    Rob

    in reply to: Validity of code to disable Google Maps #1326459

    Hi Ismael,

    Thanks for the quick answer. I already had that second option set (load only used elements).

    So, let me rephrase the question: is the code I have now in my functions.php obsolete when using this option?
    And even more importantly, does it also disable the backend (admin area) loading of the Google Maps mess? :-)

    Regards,
    Rob

    P.S.
    The reason I’m asking again is that with the code mentioned above commented out, but the option “only load used elements” set, I still see this in QueryMonitor in the admin:

    Footer:
    https://maps.googleapis.com/maps/api/js?v=3.45
    wp-content/themes/enfold/framework/js/conditional_load/avia_google_maps_api.js
    wp-content/themes/enfold/framework/js/conditional_load/avia_google_recaptcha_front.js

    So it’s almost the same question for Google ReCaptcha, which I do not use at all. Why is it loading at all here?

    Added info 2021-10-26 14:52
    Even stranger, on an exact copy for DEV of that DEVsite, one has the maps script in the backend and the other doesn’t… ?
    Also found this:

    July 22nd 2020 – Version 4.7.6
    added: filter avf_skip_enqueue_scripts_backend_grecaptcha: supress loading of Google reCaptcha scripts in backend

    and this:

    https://kriesi.at/support/topic/proper-method-to-disable-google-maps-in-enfold/

    • This reply was modified 3 years, 1 month ago by rob2701.
    in reply to: dynamic_avia folder questions #1324506

    Hi Ismael,

    Once again thank you for your patience and for the good explanation. Makes it much clearer. I learn something new every day :-)

    Best regards,
    Rob

    in reply to: Post CSS and Caching issue #1324406

    Hi Günter,

    Thanks for the update. I also would like to request that you look carefully at the selected location for the files, regarding its impact on caching plugins effectiveness (and maybe also its effect on translation plugins). For myself I will use the filter avf_post_css_create_file to skip generating these files, as you mentioned in another post.

    Keep up the good work and have a nice day!
    Rob

    in reply to: Question about WP media-elements and Enfold #1324391

    Hi Rikard,

    Thanks for the help, you can close it.

    Rob

    in reply to: Question about WP media-elements and Enfold #1324366

    Hi Ismael,

    Thanks for the confirmation and the info, good to know. I already had that toggle set, but the player script + css continued to load on translated pages, I will take that up with the plugin developer too. That’s why I wanted to deregister it completely.

    Have a good day!
    Rob

    • This reply was modified 3 years, 1 month ago by rob2701.
    in reply to: Post CSS and Caching issue #1324254

    Thanks to ThinkJarvis for the tip and to Günther for the explanation. I lost quite some time trying to figure out why there were random additional http requests in combination with W3 Total Cache, causing various issues. Additional persistent files in /uploads/avia_posts_css/ and /uploads/dynamic_avia/ did not go down well with the cache plugin. :-)
    Changing the setting to “leave query strings enabled” in Enfold Performance solved these issues.

    Enfold Team, wouldn’t it be a good idea to make a sticky post about this? While it’s great that code gets enhanced and refactored, in this case it could cause troubles for those who upgraded from older Enfold versions, had that setting to remove the query strings and use a caching plugin, like probably many people do. It would also be nice to be warned beforehand, if possibile.
    Or, if the version strings are that indispensable because of the new coding way, why not remove the option “remove query strings” from the performance settings? But correct me if I did not understand the issue enough.

    BTW, thanks for all the good work and support, much appreciated.

    Best regards,
    Rob

    in reply to: MegaMenu submenu items keyboard accsessibility #1323717

    Hi,

    Never mind, I found the proper solution in another forum post:
    https://kriesi.at/support/topic/tabs-select-on-hover/#post-1307497
    which adapted seems to be working well:

    // add child theme adapted megamenu.js for keyboard accessibility of submenus
    function change_megamenujs() {
      wp_dequeue_script( 'avia-megamenu' );
      wp_deregister_script( 'avia-megamenu' );
      wp_enqueue_script( 'avia-megamenu', get_stylesheet_directory_uri().'/js/avia-snippet-megamenu.js', array('jquery'), 3, true );
      }
    add_action( 'wp_enqueue_scripts', 'change_megamenujs', 100 );

    Thanks for the support, issue solved.

    Have a good day!
    Rob

    in reply to: MegaMenu submenu items keyboard accsessibility #1323598

    Hi,

    Thanks so much for the modification to the avia-snippet-megamenu.js file, it works perfectly.

    On a related note, what is the proper way to replace the parent theme script with the modified child theme version?
    Doing it the wrong way works, and I can’t seem to find the right working way to replace it.

    When I do it the wrong way, like this:

    // add child theme adapted megamenu.js for keyboard accessibility of submenus
    wp_dequeue_script('avia-megamenu');
    wp_enqueue_script('avia-megamenu', get_stylesheet_directory_uri().'/js/avia-snippet-megamenu.js', array('avia-default'), '', true);

    it works fine, but then of course I get debug notices:

    Notice: wp_dequeue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the avia-megamenu handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /usr/local/www/mforams2/wp-includes/functions.php on line 5663
    Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the avia-megamenu handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /usr/local/www/mforams2/wp-includes/functions.php on line 5663

    When I (try) to do it the proper way, it does not seem to replace the parent theme one. I tried it like this:

    // add child theme adapted megamenu.js for keyboard accessibility of submenus
    function change_aviamegamenujs () {
        wp_dequeue_script( 'avia-megamenu' );
        wp_enqueue_script( 'avia-megamenu', get_stylesheet_directory_uri().'/js/avia-snippet-megamenu.js', array('avia-default'), '', true );
        }
    add_action( 'wp_print_scripts', 'change_aviamegamenujs', 100 );

    Remark: the replacement is in child theme functions.php line 687.

    Can you help me do it the proper way? Thanks in advance!

    Rob

    • This reply was modified 3 years, 1 month ago by rob2701. Reason: location of replacement in functions.php added
    in reply to: MegaMenu submenu items keyboard accsessibility #1323585

    Hi Ismael,

    Thanks for looking into this and for your time. Sorry for the confusion, I wrongly assumed the normal menu was called Mega because the behaviour was modified in the avia-snippet-megamenu.js file… :-)

    I will give this a go today and let you know the results here.
    Will this code be added to the next Enfold update? I imagine there must be more people needing keyboard accessibility.

    RESULT:
    Your modification works perfectly for getting the submenu items keyboard accessible. Thanks again, you’re a star!

    Have a nice day,
    Rob

    • This reply was modified 3 years, 1 month ago by rob2701.
    in reply to: blog posts page separation between entries on mobile #1323490

    Hi Yigit,

    Thank you very much for the quick fix, that looks perfect now. You’re a star.

    Have a good day!
    Rob

    in reply to: MegaMenu submenu items keyboard accsessibility #1323388

    Hi,

    Sorry, my bad to call it mega menu, I thought it was called that (because of js filename). I mean the menu with submenu items. Let me call it the menu then, but that doesn’t change the fact that with the old code the submenu items are kb accessible, with the new code not :-)

    Of course I kept the compression disabled initally while testing, just switched it on later.
    So regardless of the name for the menu, how do I get the code functioning for the keyboard access for the submenu items again?

    Just to be clear: the production website mentioned above has the adapted 2020-10-06 version active (so from last year), the development website has the adapted 2021-10-04 version active (your adapted version).

    Remark:
    On the development copy I have put the 2020-10-06 version back, so you check that with this one the submenu keyboard access does work (Blog & Info have subitems). After that, feel free to try with the adapted 2021-10-04 version, re-enable compression and see what happens to the top image on the home page, the images on the tours portfolio and single tours, the images in the iimpressions portfolio.

    Regards,
    Rob

    • This reply was modified 3 years, 1 month ago by rob2701. Reason: typo fixed
    in reply to: MegaMenu submenu items keyboard accsessibility #1323385

    Hi Ismael,

    Thanks for looking into this. I replaced the code in the file like you said, but unfortunately it does not make the submenus keyboard accessible. Also, once the Enfold file compression is enabled again, it blanks the top image on home page and the images on the Tours, Impressions and Info pages, so something is not quite right yet.

    I have left the replaced code in place on the dev site so you can see (also there as avia-snippet-megamenu_2021-10-04.js).
    On the live website the avia-snippet-megamenu_2020-10-06.js code (also there on dev site) works well on submenus (see Blog and Info menu): https://mforamsterdam.com

    Can you take another look?
    Also, if you could check how I did the js replacement in child theme functions.php line 687-690, I would appreciate your advice for improvement (now gives a notice in debug log).

    Thanks and have a good day,
    Rob

    in reply to: mfp-title lightbox images #1289427

    @Guenni007

    Thanks for noticing that one Guenni, I totally forgot about that one which I added a year ago to the functions.php of the child theme (to hide image filename / alt text displaying on hover). I will change it, thanks!

    Rob

    in reply to: mfp-title lightbox images #1289393

    Hi Mike,

    Thanks for looking into this. I respect your conclusions, but I know what I saw on my site. Don’t worry so much about the tone, we’re all adults and can handle a little friction at times :-)
    If I test with the latest theme version on a clean slate, indeed the CSS trick works on created masonry galleries like it should. But on my live site it did not (not even with div or #top specificity added). Could it be that the merge of CSS and JS played a role in the difference of behaviour before and after I saved those settings again?

    Like you said, after the event it’s always difficult to assess an issue. There could indeed have many customizations in play, or even a certain version of the theme (with galleries created before the lightbox text options and lazy loading were added) behaving a certain way after the update.Btw, I used the Perfect Grid ones, don’t know if that plays a role.

    I resorted to the manual fix of the galleries because I did not want the site to have the filenames below the lightbox images on all galleries. So now I have no way of going back to the original issue.

    I’m sure the dev team takes great care in preparing and testing updates, and I’m always very content with Enfold. But there are just too many possible scenarios in people’s customized sites (and version update skips) for the team to cover all in advance, so that’s not a critique.

    My remark about the “default action” was about the “image caption or image title if empty” and the “image description or image title if empty”. My choice would have been “or no text if empty” in those two cases.

    So let’s just say I ran into an unfortunate collision of circumstances. And thanks again for looking into it.

    Rob

    P.S.
    Guenni007, thank you also for looking into it.

    Added remark:
    There is an important distinction here which is of note. Normal portfolio galleries, when re-saved with the new options, do add the lightbox_text='no_text' field in the code. BUT…when a gallery has been previously added to a Blog Post (through the Insert Theme Shortcode button), before the option existed, then the only way in which this field can get added to the code later is by inserting it manually. Which is what I had to do.

    • This reply was modified 3 years, 8 months ago by rob2701. Reason: Added remark about masonry galleries in blog posts
    in reply to: mfp-title lightbox images #1288587

    Hi Victoria,

    Thanks for the reaction, my manual fixes work well. Any answer to my previous questions is still apreciated though :-)

    1) why do the masonry galleries default to “filenames” instead of “no_text” when they pre-existed?
    2) why doesn’t the CSS mentioned work on those fields?

    Because 2) could not be applied, I had to go and edit each masonry gallery in each portfolio and in each blog post by hand…
    And this is not just for me, everyone who had masonry galleries created before the title fields were introduced/updated in the theme will face the same issue. Not a major one, but it can be annoying surprise for those that have a lot of masonry galleries.

    Kind regards,
    Rob

    in reply to: mfp-title lightbox images #1288015

    Hi Victoria,

    In the meantime I have edited the masonry galleries by hand to get rid of the filenames below the lightbox images, so the link won’t do you much good, but here it is:
    https://mforamsterdam.com

    However, the issue is simple:
    Galleries created before the option for text below the lightbox images was introduced did not have the code
    lightbox_text='no_text'
    of course. And since someone decided to add filenames as default when no caption was present, then all those old galleries suddenly had filenames below the lightbox images.

    You can test it easily yourself by taking out the lightbox_text='no_text' from a gallery you created, then try to apply the
    div .mfp-title { display: none !important;}
    The only thing that works in both the default language and the translation is adding the lightbox_text='no_text' to the code.

    Kind regards,
    Rob

    P.S.
    And yes, I am also very happy that the team created the text options below the lightbox images, I just don’t understand why it needs to default to filenames instead of defaulting to “no text”…

    • This reply was modified 3 years, 8 months ago by rob2701. Reason: corrected typos
    in reply to: latest Enfold won't play my videos #1254770

    You’re welcome, I just had the same issue myself. It seems the introduction of new dropdown choices there changed the default behaviour. It used to work automatically whenever a custom link was filled in, now you have to specify that the custom link is actually used. Glad it is solved for you!

    Rob

    in reply to: latest Enfold won't play my videos #1254765

    As the problem is described very well in the very first post, try this:
    Gallery options > Advanced tab > Link Settings: Use custom link (fallback is no link)

    Rob

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

    Hi dear Enfold users & srcset advocates,

    Sorry to weigh in on an already lengthy discussion here and elsewhere, but this is just my two cents for those who may benefit from it. If not, please ignore.

    I have read many long rants over the years about Enfold and WP srcset. For everyone almost starting a holy conversion war about the (alas) much-coveted WP srcset implementation, please consider this and then think about the consequences long and hard:

    1.
    Smaller viewports often have higher resolutions than desktop screens these days. And no, pixel density cannot be accurately determined for now remotely (too many ‘standards’).

    2.
    ALL devices (desktops, tablets, phones and whatever else) have zooming capabilities, be it inside the device or in the browser. Zooming is also heavily used for accessibility reasons. What do you think happens to your precious scale-served image when zoomed 5 times? Try it. Enjoy 1980’s pixelation.

    3.
    Whether you like to admit it or not, WP srcset is primarily targeted to cater to users and webmasters who are not willing (or able because of multi-user setups) to do manual calculations and preparations on their images, in other words: ease of use for those who don’t want to (or can’t for some reason) do the math and extra work. The same goes for Enfold’s automatically created image sizes: it’s very convenient and handy for those not willing or able to do their own calculations based on their own setup, and works well that way. Good job Enfold team and excellent compromise.

    4.
    If your audience is mostly in badly covered network areas with high cost bundles, then by all means help your users minimize data consumption by using srcset where you can. But if your audience is mostly in well covered network areas, you may want to think again. And please stop thinking PageSpeed or Lighthouse are the holy book with their advice. Think for yourself.

    5.
    My take on this therefore has been for years: it’s better to serve up ONE double-size image (calculated for each particular element) with high compression (so-called low quality) to all devices, because more pixels beat a higher quality setting EVERY time. Images are not even larger in that way. And perform well on high-resolution screens and when zoomed. Except for zooming on very large screens, but who needs to zoom there anyway…

    Anyways, to each their own. Just don’t rant on about WP’s srcset implementation as if it was the holy grail of all things and the theme world and Enfold would crumble without it. Because nothing could be farther from the truth. All solutions to this problem (including mine) are a mediation and compromise at best.

    All have a great day. And my compliments to the Enfold team for dealing with these issues in a sensible manner.

    Rob

    in reply to: enquiry about WP autop function #1245659

    Hi Ismael,

    Thank you for taking a look and for the advice, very useful and helpful. It must be the tinymce option, because the plugin to toggle wpautop did not work. I (wrongly) assumed that the translation window was also Classic Editor.
    You’re a star!

    You can close this, thanks,
    Rob

Viewing 30 posts - 31 through 60 (of 150 total)