Images in template (8 posts)

  1. krisleech
    Posted 11 years ago #

    How do i include images in my template?
    I have tried coping the image to a sub folder the theme folder as in the Kubrick example, but I get a broken image.
    If any one has time please take a look: http://www.interkonect.com/websites/ElliesBears/wordpress/
    Im trying to mirror the look of the main site: http://www.interkonect.com/websites/ElliesBears/
    You can see where the image should be....!
    Any suggestions, i dont wanna use css to do it as i am laying out in tables using dreamweaver.

  2. Rob Poitras
    Posted 11 years ago #

    are you u sure the image is in the right location?
    your template file is pointing here:

    for the image, but it looks like you dont have the image in that folder/location

  3. krisleech
    Posted 11 years ago #

    The SRC for the image is: images/logoWithBear.jpg and file exists.
    Does it need to be a absolute link?
    Yes that has to be it, the image path is relative to the template file (index.php in themes) but when the actual page is generated that relativity is no longer valid?
    The same goes for any static links in a template - they will not work.
    Is there a way around this without typing out the full URL to an image or web page?

    Cheers K.

  4. krisleech
    Posted 11 years ago #

    OK further to the above i found the image links in the Kubrick theme, which uses: bloginfo('stylesheet_directory');
    Easy just pop this in before the URL like this: <img name="logoWithBear" src="<?php bloginfo('stylesheet_directory'); ?>/images/logoWithBear.jpg" width="172" height="115" border="0" alt="Elliesbears - Handmade with love">

    And you get dynamic paths for your static links, K.

  5. Stefano Aglietti
    Posted 11 years ago #

    Use the same method used in the default theme:

    src="<?php bloginfo('stylesheet_directory'); ?>images/logoWithBear.jpg"

    so the refnce to images will be correctly referred to your image directory you have under your custom style.

  6. blog4
    Posted 11 years ago #

    Could someone (or has someone) done a step-by-step image insertion routine? Example: 1) I am reading a blog; 2) it has a nice chart or photo I want to refer to in my blog; 3) I write a paragraph in my blog on the source and why I think it is interesting; and 4) I copy the chart/photo into my post for illustration. What are the steps I must take witin 1.5 Kubrick? Must it be a whole lot more complex than writing the paragraph and pasting the image into an email? If so, sign me "Spoiled Emailer" ;-)

  7. krisleech
    Posted 11 years ago #

    I think your question is different, i would start a new post.
    I wanted to insert an image as part of the template/theme, you want to insert an image in to a web log post right?

  8. kookai
    Posted 11 years ago #

    OMIGOD just to post a picture you have to go thru all of this? Sucks...

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.