ThemeShaper Forums » Thematic

Child theme url

(8 posts)
  • Started 10 years ago by gelay
  • Latest reply from gelay
  • This topic is resolved
  1. I am using a child theme with Thematic. In my child theme when I use:

    <?php bloginfo('template_url'); ?>

    I get the parent theme url. How can I get the child theme url?

    Posted 10 years ago #
  2. Try this one:

    $stylesheet_dir = @ dir(ABSPATH . '/wp-content/themes/' . get_stylesheet())

    Cheers,

    Chris

    Posted 10 years ago #
  3. Sorry .. my head is still not clear enough .. hate that cold.

    You need to combine get_bloginfo('url') . 'wp-conten/themes/' . get_stylesheet()

    Posted 10 years ago #
  4. Got it:

    <?php bloginfo('stylesheet_directory'); ?>

    Posted 10 years ago #
  5. <?php bloginfo('stylesheet_directory'); ?> is listed under deprecated parameters in WP 2.3.1

    Posted 10 years ago #
  6. echo dirname( get_bloginfo('stylesheet_url') ) is better.

    Posted 10 years ago #
  7. I'm using:
    echo get_stylesheet_directory_uri().'/style.css';

    Posted 10 years ago #
  8. Thanks

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.