• Resolved liverpoollad

    (@liverpoollad)


    I’ve been trying to customise the WordPress banner so that I can use image slices, to keep the size down and to include animated gifs in various slices.

    To do this, I created slices along with a table, which I include in the header.php file.

    However, I can see the table, but no images. This is not a directory misspelling in the url, and I’m pointing to where the images are all stored.

    It would be nice to have slices as it will keep the banner size down.

    Has anyone managed to use slices to make up a WordPress banner?

    PS – apologies for using another thread to ask how to actually post in these forums.

    WordPress has made me rethink web design.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I’m pointing to where the images are all stored
    Can we get a link to see it for ourselves?

    Thread Starter liverpoollad

    (@liverpoollad)

    Here you are Moshu

    It’s work in progress, not the finished thing.

    http://www.kirkbytimes.co.uk/wordpress6/

    You should see the header with a table, but no images

    Thread Starter liverpoollad

    (@liverpoollad)

    I’d really like to keep the sliced banner, the reason I used that approach was down to not being able to include an animated candle on the original banner, which would fit into a designated point on banner.

    By using slices in the banner, it cuts down the time it takes to download for 56k users (who I think of) and allows a great chance for putting several animated gifs into the banner, (cuts out using divs to do so) plus I can add hover descriptions of various aspects of the banners art and maybe a few hyperlinks.

    WordPress is addictive stuff.

    Thread Starter liverpoollad

    (@liverpoollad)

    I know what you mean, but cannot see were I am making a mistake pointing to the path of the files.

    I use the header.php file to bring the image slices into play, here is the path I point to ….

    <td colspan=”2″ rowspan=”2″>
    <img id=”christian_730_240_02″ src=”images/christian_730_240_02.png” width=”506″ height=”62″ alt=”” /></td>

    I’ve got a folder named ‘images’ in the root directory of this theme, then I have a folder called ‘banners’ then ‘christian’ which contains all the image files.

    I’m a bit lost at where I’ve gone wrong.

    I don’t know if the image ID should be renamed to reflect a path.

    I’ve used Adobe to generate the tables, with slices.

    As I said: it is the wrong path. You said:
    1. I’ve got a folder named ‘images’ in the root directory of this theme,
    2. path according to you: images/christian_730_240_02.png
    3. real path in your source code: images/banners/christian/christian_730_240_01.png
    (notice the “banner” subfolder!)

    Anyway, it wouldn’t work either way 🙂
    If the images are in the wp-content/themes/yourtheme/images folder – then use this:
    img src="<?php bloginfo('stylesheet_directory'); ?>/images/etc.
    More info: Template_Tags/bloginfo

    Thread Starter liverpoollad

    (@liverpoollad)

    Thanks for your patience, I’ve figured it out. I uploaded an images folder with all the files to the root of the WordPress installation,I’ll move it back to my own themes folder after I rewrite the urls.

    Thanks a million Moshu

    This has made my day

    I’ll remove the url as I’m still working on this design, a nice 3 column that sits well with most small screen resolutions.

    I’ll release some themes soon.

    Thread Starter liverpoollad

    (@liverpoollad)

    Thanks again – you were right about normal url not working, it works with the home page, but not when you navigate to another page.

    With the included php code you gace above, it works a treat.

    And I do not need to have an image folder in the WordPress root directory.

    Thread Starter liverpoollad

    (@liverpoollad)

    Just to close this thread, the answer given by Moshu was spot on.

    As stated, I did not need to include an extra images folder, and can simply include the images in the usual WordPress standard directory of img, and have a subfolder as you get a lot of graphics slicing banners.

    For anyone looking to slice banners and still have your theme switcher work ok, this is the route to take.

    Remember that using slices you can customise your banner a lot more, and add hyperlinks and animated gifs to fit in.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adding Image slices to header’ is closed to new replies.