One limitation we have noticed is that, when an image is backstretch width and fades in (e.g., here), the Simply Static version does not display the featured image at all.
I suspect this could be fixed by adding appropriate js or other files (which Simply Static can do) to the HTML archive. If you have recommendations, please let us know and we’ll try it out! (We can be in touch with the Simply Static developer as well if need be.)
Btw, I believe the relevant code around that post linked above includes
srcset="https://i2.wp.com/ds.lclark.edu/kmezrahi/wp-content/uploads/sites/421/2017/09/Polar-Regions.jpg?w=1600&ssl=1 1600w, https://i2.wp.com/ds.lclark.edu/kmezrahi/wp-content/uploads/sites/421/2017/09/Polar-Regions.jpg?resize=300%2C225&ssl=1 300w, https://i2.wp.com/ds.lclark.edu/kmezrahi/wp-content/uploads/sites/421/2017/09/Polar-Regions.jpg?resize=768%2C576&ssl=1 768w, https://i2.wp.com/ds.lclark.edu/kmezrahi/wp-content/uploads/sites/421/2017/09/Polar-Regions.jpg?resize=1024%2C768&ssl=1 1024w" sizes="(max-width: 1600px) 100vw, 1600px"
and the JS I see at top is
<script type='text/javascript' src='./../../../../wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
<script type='text/javascript' src='./../../../../wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script>
<script type='text/javascript' src='./../../../../wp-content/plugins/miniorange-saml-20-single-sign-on/includes/js/settings.js?ver=4.9.4'></script>
Sure appreciate as always!
Jim
]]>Does anyone know how to change this? I don’t know js, and I’m not seeing anything relevant in the style sheets.
I was thinking this is setting the image class as .front-page-1:
jQuery(document).ready(function($) {
$(".front-page-1").backstretch([BackStretchImg.src]);
});
and this is setting the height?
jQuery(function( $ ){
// Set front page 1 height
var windowHeight = $( window ).height() - 77;
$( '.front-page-1' ) .css({'height': windowHeight +'px'});
$( window ).resize(function(){
var windowHeight = $( window ).height();
$( '.front-page-1' ) .css({'height': windowHeight +'px'});
});
…but I don’t know what to change. If I upload a 1600×750 image, it zooms in and maintains the old ratio.
]]>https://www.ads-software.com/plugins/display-featured-image-genesis/
]]>https://www.ads-software.com/plugins/easy-backstretch/
]]>I’m now trying to get my post cover background images to also resize. As these are outside of the content area it’s my understanding that the get_post_thumbnail_id function can be altered to allow resizing by the plugin.
Below is the function used to call the background image, i’m just not sure how to modified
your example to work with this.
// if the post has a featured image, send it to Backstretch else use a default one
if ( has_post_thumbnail() ) {
wp_localize_script( 'backstretch-init', 'BackStretchImg', array( 'src' => wp_get_attachment_url( get_post_thumbnail_id() ) ) );
}
else {
wp_localize_script( 'backstretch-init', 'BackStretchImg', array( 'src' => 'https://www.mydomain.com/wp-content/uploads/2015/04/94.jpg' ) );
}
Any help is much appreciated.
Best regards
Darrell
p.s Great Plugin.
https://www.ads-software.com/plugins/responsify-wp/
]]>Can anyone help to get the plugin working with this theme?
Thanks!
At the moment I’m using education pro theme.
Here is the link to my website: https://bit.ly/1GDpV7J
https://www.ads-software.com/plugins/display-featured-image-genesis/
]]>I simply want this backstretch to be a manageable div inside one post. At the moment, I don’t know where to look for it having adverse effects on my layout.
Thank you, I really welcome your advice.
https://www.ads-software.com/plugins/easy-backstretch/
]]>Is there any way to setup position: fixed
instead of absolut
A presto,
https://www.ads-software.com/plugins/easy-backstretch/
]]>