Getting a correct URL when image is present in child theme
In creating a child Theme, I'd like to be able to change the
default listing thumbnail to something that is in the child theme instead of the one in the Vantage template.
Currently, this is the code in Vantage:
Code:
function get_the_listing_thumbnail( $listing_id = '' ) {
.
.
.
if ( empty( $attachments ) ) {
return html( 'img', array( 'src' => get_bloginfo('template_directory') . '/images/no-thumb-sm.jpg', 'class' => 'listing_thumbnail' ) );
.
.
.
}
With a simple change of
get_bloginfo('template_directory') to
get_stylesheet_directory_uri() it will make it automatically retrieve the correct default thumbnail image in the child theme if it is present.
I've changed it in the code I'm using but it will really help me and other users as well if the change is done in the core Vantage code.
Hope it will be in the next version since it's a simple enough change.