Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    Member #
    22548
    I am making a wordpress theme in a wamp (xampp) environment. I think I am missing something here. When I use the images as a backround-image css property they work just fine. It is only when I am trying to use the <img> tag that they won't show up. I just get the little broken page icon where the image should be. Does anyone know what is going on?

    I am thinking about sending the unfinished theme to my host's server to see if it works live, but I don't really want to because it sounds like a pain.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    I would actually try it on the host's server if it were me.

    Your problem pertains to file paths. Whether you're using absolute paths,
    or relative paths, we of course don't know that. I would think the filenames
    themselves are correct.

    View a wordpress page on your browser and then look at the HTML source.
    Copy a few of the <img> lines (the one's that are 'X's) and show us the HTML
    for those lines. I'm interested to see how the path and image filename are
    constructed. That might give us a clue.


  4. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    Member #
    22548
    <div class="header_wrap">

    <div class="nav_wrap">

    <div class="div1">
    <a class="catbut" href="#">Catagories</a>
    <ul class="nav_menu">
    <?php wp_list_cats();?>
    </ul>

    </div>

    <a href="#"><img class="twit" src="twiticon.png" /></a>
    <a href="#"><img class="rss" src="rssicon.png" /></a>



    </div><!-- end of nav_wrap-->
    <a href="#"><img class="logo" src="jscodelogo1.png"/></a>

    </div><!--end of the whole header wrap-->



    I have the images in the same directory as the index.php and header.php.
    I have all of this code written in the header.php file and i am using the get_header() function to call it into the index.php file. I don't think that any of that would affect the images though. I am thinking of just using them as background images, but that seems kind of weird to me.

    Images are working when I do: background-image:url('twiticon.png');

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Instead of showing me the actual code (as you did in your post), display the page
    with 'x'ed images, view the HTML, copy and post some of those results. I want to see
    those <img> lines in the actual HTML, as it is displayed on your browser.


  6. #5
    Junior Member
    Join Date
    Jul 2010
    Posts
    7
    Member #
    22548
    Hey thanks a lot. I misunderstood your first suggestion, sorry. I figured it out by viewing the source in the browser like you said. I needed to put this:
    <a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/twiticon.png" /></a>

    I guess in wordpress you have to point to the directory using the bloginfo() function. I put all my images in an images folder and they worked.Thanks.

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Whew! I'm glad you figured out the bloginfo thing ... I wouldn't have thought of that.
    WordPress uses all kinds of things like that. It allows the theme and config files
    to work together ... like a theme template.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

images not showing wamp testing server
,
localhost images not showing up in wamp
,
picrures not showing up in localhost wamp
,
specifying localhost image paths in wamp server
,
wamp internet not displaying css
,

wamp website missing images

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:26 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com