I have already set up a child theme. Is it possible to add via FTP on my server a folder (preferably into the same child theme folder) called img and then link to the images in that folder from my pages and posts?
I tried using this path:
<img src="../wp-content/themes/theme-child/img/placeholder.png"/>
but that did not work.
You need to use the stylesheet directory instead. With a child theme, if you use the template directory it will go to the parent (see explanation on http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri).
It should be <img src="<?php echo get_stylesheet_directory_uri(); ?>/img/placeholder.png" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With