Hi I am adding a little woo hook in a child theme, to echo a free shipping banner, having problem with the path to image, which is next to the functions.php file in the theme root.
function denzilla_add_below_prod_meta() {
echo '<div class="free-shipping" style="background: #fdfd5a; margin-top: -5px; margin-bottom: 15px">';
echo 'img src="free.jpg" />';
echo '</div>';
}
is the function, but am just getting the text "img src="free.jpg" />" output on front end page instead of the actual image.
Any tips on the correct path (both files are next to each other in theme root) or maybe one of the get_theme_url or similar hooks to do it?
Thanks
2
Answers
Update your code with these 2 things