Forums

Give help. Get help.

  • # December 18, 2008 at 8:24 pm

    Hey people,

    I’m following Chris’ WordPress tutorials and I’m stuck and I need some advice.

    I’ve come to the side bar and I’m emptied it, like Chris does in the tutorial and I’m having problems customising it. (Also, I’m guessing there is probably an easier way to do this.)

    Anyhow, I attempted to create some links and insert images inside the anchor tags but it doesn’t display the images. It does when I link to an external source though.

    Here’s what I’m using:

    Code:

    Club Affiliates



    What’s confusing me is the src link is definitely correct because this works :

    With the following CSS:

    Code:
    a#logo
    {
    width: 530px;
    height: 146px;
    background: url(‘images/logo.jpg’) top left no-repeat;
    text-indent: -9999px;
    float:left;
    margin: 0 0 0 10px;
    }

    Can anyone help!

    I’m guessing it’s probably me being dumb but I can’t figure this out.

    TIA!

    # December 19, 2008 at 7:50 am

    I tried what you said and it worked.

    http://localhost/wordpress/wp-content/t … /logob.png

    How come the shortened version doesn’t work like it does with CSS?

    I’m confused :o

    Anyhow, that’ll do for now.

    Cheers.

    # December 19, 2008 at 10:27 am

    The only sub directory is the images folder. Everything else like sidebar.php and my style sheet reside in the same directory.

    The following CSS works fine:

    Code:
    background: url(‘images/logo.jpg’)

    That’s why I don’t understand why I can’t do this:

    Code:
    src=”images/swansea.jpg”

    Instead of this:

    Code:
    src=”//localhost/wordpress/wp-content/themes/starkers/images/image.jpg”
    # January 20, 2009 at 2:03 pm

    Just a quick update, in case someone else has had the same problem. I now reference my files via this function:

    <?php bloginfo(‘template_directory’); ?>

    For example:

    <src="<?php bloginfo(‘template_directory’); ?>/images/image.jpg"/>
    <script src="<?php bloginfo(‘template_directory’); ?>/js/functions.js" type="text/javascript"></script>

    Just a bit easier than what I was using previously, plus if I rename my theme directory I won’t have to edit a dozen or so links.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag