Url In Php
Posted 11 December 2012 - 01:29 PM
I am working on a section for our website and i am having a problem with the image url.
The code below gives me the location of wp-content/themes/imsm-website-child-theme/sections/pagelines-sections/images/ourimage.gif and it needs to be wp-content/themes/imsm-website-child-theme/images/ourimage.gif
printf('<img src="%s">' , $this->base_url. "/images/" .$business_image);
Can anyone help with a fix as it driving me crazy
Posted 11 December 2012 - 02:06 PM
I have already tried to replace $this->base_url. with $this->get_stylesheet_directory_uri(); it breaks the theme
Posted 11 December 2012 - 02:17 PM Best Answer
without the $this->
get_stylesheet_directory_uri() is a core wp function.
Posted 11 December 2012 - 02:26 PM
Ok, I get it now makes complete sense, Thank you simon.