Child Theme URL


Hi There,

I have a question regarding the url. I've created a custom page(home.php) and I added a slideshow the problem is my code doesn't work, see sample below of my code:

<ul>
  <li>
    <img src="<?php bloginfo('template_url'); ?>/images/slider.jpg" width="" height="" alt="">
  </li>
<ul>

How can I get the root url of the child theme? I'm no expert about this I'm still learning wordpress and I like this framework so far.

Thanks in advance, Steve


Hey Steve,

I am not sure I understand your code, do you just have that in your home.php template? Is your home.php template in your child theme?

To get your child theme directory uri, you may use get_stylesheet_directory_uri() which is a core WordPress function (see documentation here).

Perhaps you could let's us know a bit more about what you are trying to achieve so that we can point you to the right direction.

Thanks,


works like a charm..thanks man 🙂


Write a reply

Login or register to write a reply, it's free!