• I have created a custom theme before and I had to specify a base code in the html to tell wordpress where my theme was in the themes folder so wordpress can see the stylesheet and images. What is the correct way of getting WP to see the images etc in the themes folder. Is there a function or something somewhere that I need to include in my theme?

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php bloginfo('template_url');?>/images/yourimage.jpg

    To link you your stylesheet you should use:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    In the stylesheet you can use relative URLs til images by using the URL-tag:

    #somestyle: {
    background-image: url(images/yourimage.jpg);
    }

    But in the HTML, like jaredatch says, you should use:

    <img src="<?php bloginfo('template_url'); ?>/images/yourimage.jpg">

    Thread Starter Five Fifty

    (@five-fifty)

    Thanks Guys, exactly what I needed!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing images and styleshhet’ is closed to new replies.