Genesis Backstretch Featured Image
-
Hi,
I’ve setup RWP on a Genesis Child Theme and so far everything is working great.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
Darrellp.s Great Plugin.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Genesis Backstretch Featured Image’ is closed to new replies.