Forum Replies Created
-
AuthorPosts
-
interesting Question – and still relevant after such a long time.
I also wondered about the poorer loading times of a start page – especially these resources were named there for the poorer values (pagespeed insights – lighthouse). It should be possible, with the above-mentioned settings, not to load these resources if you have not selected videos as slides.by the way: to avoid this with nth-child use instead nth-of-type:
https://tympanus.net/codrops/css_reference/nth-of-type/btw: I had a similar experience last week. Everything that was working fine was suddenly showing up as broken on the pages. What I had not considered was that I had changed my bank details in the meantime, but had not updated them on Google. Trivial – but with a big effect.
next: you can exclude some scripts (or css) from merging by:
function avia_exclude_files_from_compression($excluded_files){ // exclude css $exclude_css = array( 'layerslider', 'abc', 'xyz'); // comma separated list of enqueue names $excluded_files['css'] = array_merge($excluded_files['css'], $exclude_css); // exclude js files $exclude_js = array( 'avia_google_recaptcha_front_script', 'abc_script'); // comma separated list of enqueue names $excluded_files['js'] = array_merge($excluded_files['js'], $exclude_js); return $excluded_files; } add_filter('avf_exclude_assets', 'avia_exclude_files_from_compression', 10, 1);
f.e. in combination with my borlabs cookie plugin – i had to exclude the recaptcha script of google to work fine:
avia_google_recaptcha_front_scriptdelete the uploaded Font – and reupload it again – that should solve both “errors” the usage of http instead of https and the source link
by the way – a nice migration tool is : duplicator – even in the free version ( only scheduling and some external backup places are missing) will do a very good job
September 14, 2023 at 5:07 pm in reply to: Unexpected : DOMException: Failed to load because no supported source was found #1419177es ist nicht so wichtig die Lösung des Problemes zu finden. Es passiert in den pagespeed insights dann, wenn das mp4 auf autoplay gesetzt ist.
meine Theorie dazu ist, das der play Befehl erfolgt bevor das Video geladen ist. Siehe deine Testseite mit deinem video.Problem ist, das es nicht reproduzierbar ist. Mal meldet Pagespeed den Fehler mal nicht. Daher – verschwende keine Weitere Zeit auf dieses Theme.
Danke fürs reinschauenSeptember 13, 2023 at 5:23 pm in reply to: Unexpected : DOMException: Failed to load because no supported source was found #1419077September 13, 2023 at 1:03 pm in reply to: Unexpected : DOMException: Failed to load because no supported source was found #1419032See Private Content
-
This reply was modified 2 years, 1 month ago by
Guenni007.
please erase that post here – i try to answer to another one that was opend on a different window :)
Try to install that little plugin: https://wordpress.org/plugins/dark-mode-toggle/
Even in the free version there is an option to exclude Elements from dark-mode via class (dmt-filter-1)
so if you insert on child-theme functions.php:function exclude_from_darkmode(){ ?> <script> window.addEventListener("DOMContentLoaded", function () { (function($) { $('.logo, #footer, #socket').addClass('dmt-filter-1'); })(jQuery); }); </script> <?php } add_action('wp_footer', 'exclude_from_darkmode');
these elements and all child elements were excluded. The same if you insert to alb element that custom class!
by the way : you can exclude a whole color-section but include again a child by adding the same class to it :lol : -1 x -1 = 1
I don’t know why images on sliders (see example page) are excluded from the outset.Or, to cut a long story short, manually setting up a colour scheme that is responsible for the dark mode would be more time-consuming, but would probably produce better results.
i tested ( not all on Enfold ) a lot of those dark-mode solutions.
They all suffer from the fact that switching to dark mode often does not produce a satisfactory result. So maybe another approach I had in mind is to use this snippet to set a custom colour scheme.
function custom_color_set($color_sets){ $color_sets['dark_mode'] = 'Dark Mode'; return $color_sets; } add_filter( 'avf_color_sets', 'custom_color_set', 999, 1 );
but on that case the class (dark_mode) will not go to the alb element – but to the body class list. Maybe we can add for that new color-set some input-fields for menu-colors and header area colors.
Then all we would have to do is add a button (e.g. in header_meta) to switch the page to that colour scheme.
Of course, it would be a lot of work to set this up, but it could be worth it for a better customised look.
one thing to mention – that video is from 2018. Meanwhile, many deprecated functions have been removed in newer versions of jQuery.
so the video shows:
$(window).load(function(){ …
this is now:
$(window).on('load', function(){
instead of using that script Mike linked to – use the filter:
add_filter( 'avf_default_lightbox_no_scroll', '__return_true' );
give a custom-class to those text-block elements – f.e.: justified-textblock
#top .justified-textblock p { text-align:justify; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; /*** new options for hyphens auto with less browser support -webkit-hyphenate-limit-chars: auto 4; -ms-hyphenate-limit-chars: auto 4; hyphenate-limit-chars: auto 4; ****/ }
don’t know if those browser support prefixes are still in use ;)
but! the browser’s Justified Text setting may give unusual results, as it generally does not set any conditional word wrapping (including hyphens).
There was in former times there was Plugin : Hyphenator that can do a better job – but the plugin has been closed as of July 27, 2023
Maybe the plugin: wp-typography is a good alternative
So you have set the image to float left f.e.
And there is only one line of text next to it! – asign a custom class to that text-block to better select it specifically
then try.avia_textblock.alignmiddle > p { display: flex !important; align-items: center; }
see here with an alternative Layout to reach what you like to have:https://webers-testseite.de/steveorrmedia/
but this will only work if there is only one p tag inside that text-block element. Otherwise you had to use the text-mode of the text-block to set the image in one div – and the text besides in another div. By this we can use then the flex method again with these two containers.Yes, for masonry gallery it works as it should – but for gallery there is no response to the choices.
September 9, 2023 at 12:40 am in reply to: Problem Slider volle Breite ist nicht an oberen Rand zu bekommen. #1418517bei Enfold 5.6.6 ist die Option direkt unterhalb des Logos zu sehen: : Theme Optionen – Transparency Logo Options –
wähl das mal aus, dann gib das Logo an, welches du im Transparenz Modus nutzen möchtest.
Das andere Logo ist für die nicht Transparenzen zuständig.Bessere Ratschläge könnte ich nur geben, wenn ich die Seite sehen könnte.
put this to your child-theme functions.php:
(see on docu: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#customization )function avia_include_shortcode_template($paths){ $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; } add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
and copy that edited video.php to that folder : shortcodes
but please if it is possible this should be default setting !!!
And perhaps only a checkmark if you realy need that.But if i inspect the DOM before that change – f.e. on autoplay even there – no parameters were set at the url
just that f.e.src="https://www.youtube.com/embed/G0k3kHtyoqc?feature=oembed"
no autoplay=1 is set to the url etc. – with the changes above – no rel=0
PS: on sliders there are those $video_data’s going to the output of the video url:
September 8, 2023 at 5:02 pm in reply to: Problem Slider volle Breite ist nicht an oberen Rand zu bekommen. #1418490ok i see:
the lightbox script got his titles from the img tag not the anchor !
so on line 784 (enfold 5.6.6) and on line 806:Guess title should be:
title="{$lightbox_title}"
i do not know how to handle the $prev_img_tag if we had to change that too.only for info to mods:
Funnily enough, I can find the instructions for this in gallery.php – and not in masonry-gallery.php.:
(they are in the helper for masonry: class-avia-masonry.php)$lightbox_title = $title; switch( $lightbox_text ) { case 'caption': $lightbox_title = ( '' != $caption ) ? $caption : $title; break; case 'description': $lightbox_title = ( '' != $description ) ? $description : $title; break; case 'no_text': $lightbox_title = ''; }
?
on default there should be a working choice for that under the option to choose the lightbox option:
but i recognized now that for galleries – that option has no influence – but test yourself on your gallery. On Masonry Gallery it works well to choose “no text”
if so we had to inform a Dev here on board – to fix it.
in the meantime you can set the mfp-title to display: none
div .mfp-title { display: none !important; }
First : you want to get rid of the titles under the opend lightbox images – or do you like to have different Text there and not the image titles?
____Next: how do you insert images?
If you are knowing how to insert new images then you see those little crosses on already existing images in that gallery.:
hovering the “X” will turn that to a minus sign “-” click and the image is gone.
September 8, 2023 at 7:38 am in reply to: Still fighting with managing default image sizes. #1418419i don’t know how your plugin react on this. My solution above is only for working with snippets inside your child-theme functions.php.
i do not know how those regenerate Plugins do their job. – F.e. if they remove allready existing recalculated images.
There is one Plugin from : Shortpixel Group: https://wordpress.org/plugins/regenerate-thumbnails-advanced/if this plugin recalculates the images – you can have under advanced options to erase non recalculated images from the uploaded folder.
(click to enlarge:)
btw.: this plugin also can create new image sizes.The only thing I notice is that the compression level does not work for Enfold formats.
But you can set that beforehand by f.e:add_filter("avf_jpeg_quality", "avf_set_quality_mod", 9999, 1); add_filter("avf_wp_editor_set_quality", "avf_set_quality_mod", 9999, 1); function avf_set_quality_mod($quality) { $quality = 55; return $quality;}
OK – i did not know that it still works – but you had to go the way over embed then. Nice
Yes – thats only a matter of youtube (Google) settings. In the past, it was possible to prevent various things by adding an attachment to the video url. They have decided not to allow this any more.
z.B.:
https://www.youtube.com/embed/1YQ8iP0DiUk?autoplay=1
So the Google people decided to patronise their users even more. i didn’t find anything on https://developers.google.com/youtube/iframe_api_reference.
I really do wish that I was wrong about all this.
September 7, 2023 at 7:08 pm in reply to: Still fighting with managing default image sizes. #1418394adding new images sizes:
add_image_size( 'custom-size', 220, 180, true ); // crop: false is default add_image_size( 'custom-size', 220, 220, array( 'left', 'top' ) ); // Hard crop left top
or:
add_image_size( 'new-size', 2000, 500, true ); function my_custom_sizes( $sizes ) { return array_merge( $sizes, array( 'new-size' => __( 'New Size' ), ) ); } add_filter( 'image_size_names_choose', 'my_custom_sizes' );
/***** redefine existing size ****/
function custom_modified_thumb_sizes( $size ){ $size['entry_with_sidebar'] = array('width'=>900, 'height'=>450 ); $size['entry_without_sidebar'] = array('width'=>1200, 'height'=>600 ); return $size; } add_filter('avf_modify_thumb_size', 'custom_modified_thumb_sizes', 10, 1 );
same as above : regeneration had to be done
September 7, 2023 at 7:05 pm in reply to: Still fighting with managing default image sizes. #1418393Try this and for changing the direct next post:
https://kriesi.at/support/topic/enfold-image-sizes-3/#post-1108904
https://kriesi.at/support/topic/enfold-image-sizes-3/#post-1109028
But : after erasing some of those image-sizes – you had to regenerate your thumbnails : there are some good plugins to do so.
f.e.: https://wordpress.org/plugins/force-regenerate-thumbnails/// Disable loads of Enfold & WP image sizes upon upload // do image sizes manually, double-size with high compression for retina screens // use Photoshop to set exact double size and quality between Q30 and Q40 add_action('init', 'remove_enfold_image_sizes'); function remove_enfold_image_sizes() { // do NOT remove widget size, is used in backend portfolio items! // remove_image_size('widget'); remove_image_size('square'); remove_image_size('featured'); remove_image_size('featured_large'); remove_image_size('portfolio'); remove_image_size('portfolio_small'); remove_image_size('gallery'); remove_image_size('magazine'); remove_image_size('masonry'); remove_image_size('entry_without_sidebar'); remove_image_size('entry_with_sidebar'); remove_image_size('shop_thumbnail'); remove_image_size('shop_catalog'); remove_image_size('shop_single'); remove_image_size('shop_gallery_thumbnail'); } // Remove unneeded WP image sizes add_filter( 'intermediate_image_sizes_advanced', 'prefix_remove_default_images' ); // Remove default image sizes here. function prefix_remove_default_images( $sizes ) { // do NOT remove small and medium sizes, they are used in backend Media Library! // unset( $sizes['small']); // 150px // unset( $sizes['medium']); // 300px unset( $sizes['large']); // 1024px unset( $sizes['medium_large']); // 768px return $sizes; }
September 5, 2023 at 1:02 pm in reply to: How to sort custom post type posts with custom post meta field #1418150you see that the if clause is allready an array – so comma separated id’s will do that job:
… if ( is_page(array(1132, 6481)) ) {
-
This reply was modified 2 years, 1 month ago by
-
AuthorPosts