Submit Your Article Forum Rules

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Image's not showing up on website?

  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    36

    Image's not showing up on website?

    I am using a Wordpress themed website.

    On my home page (where the blog is) I can see the images that I put into a post.

    BUT when I click on an "individual" post, the image will not show. I looked at the html code and the code shows the correct link to the image except that the code was a little faded out. I have no idea what could be causing this.

    You can see a good example here
    pokemonsocial.com/pokemon-lovers-writers-youtubers/
    You can see that there is supposed to be an image to the right.

    Any ideas on how to fix this?

    thanks,
    Kyle

  2. #2
    Moderator chrisJumbo's Avatar
    Join Date
    Oct 2005
    Location
    Near Sacramento, CA
    Posts
    794
    Here is the source for that block of the page:
    Code:
    <div id="attachment_206" class="wp-caption alignright" style="width: 136px">
    <a href="http://www.pokemonsocial.com/pokemon-lovers-writers-youtubers/blue_eyes_by_twime777-d4iyaap/" rel="attachment wp-att-206"></a>
    <p class="wp-caption-text">Pokemon - Lairon</p></div>
    There is no code that references an image. The homepage does:
    Code:
    <img class=" wp-image-206 " title="blue_eyes_by_twime777-d4iyaap" 
    src="http://www.pokemonsocial.com/wp-content/uploads/2012/01/blue_eyes_by_twime777-d4iyaap.png" alt="Lairon" width="126" height="102" />
    </a/
    Do you know where the code is that is creating the different pages (Main vs single post?) Is this a custom theme?
    cd :O)
    Last edited by chrisJumbo; 02-06-2012 at 01:32 PM. Reason: readability

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    36
    Quote Originally Posted by chrisJumbo View Post
    Here is the source for that block of the page:
    Code:
    <div id="attachment_206" class="wp-caption alignright" style="width: 136px">
    <a href="http://www.pokemonsocial.com/pokemon-lovers-writers-youtubers/blue_eyes_by_twime777-d4iyaap/" rel="attachment wp-att-206"></a>
    <p class="wp-caption-text">Pokemon - Lairon</p></div>
    There is no code that references an image. The homepage does:
    Code:
    <img class=" wp-image-206 " title="blue_eyes_by_twime777-d4iyaap" 
    src="http://www.pokemonsocial.com/wp-content/uploads/2012/01/blue_eyes_by_twime777-d4iyaap.png" alt="Lairon" width="126" height="102" />
    </a/
    Do you know where the code is that is creating the different pages (Main vs single post?) Is this a custom theme?
    cd :O)
    Yes, I am using a Wordpress theme called Pandora. I customized it so that it fits with Buddypress (but the problem is not on any of the Buddypress pages)

    The home page uses index.php of course. And yes, I know that the page with the problem for single posts uses single.php

    I looked at the code, but I don't know much of PHP. This is really annoying because it is confusing the writers that write for my website.

  4. #4
    Moderator chrisJumbo's Avatar
    Join Date
    Oct 2005
    Location
    Near Sacramento, CA
    Posts
    794
    I got 'em. I wonder, is it treating the image like a thumbnail? The index file includes code to display thumbnail images, the single file does not. With my site, I actually include the images as part of the content post. The post within the Wordpress editor looks like:
    Code:
    <img class="alignright size-full wp-image-134" title="logo" 
    src="url to image"  width="220" height="41" alt="logo"/>
    <p>Post content.</p>
    Let me know if that helps.

    cd :O)

  5. #5
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,793
    I would throw in this caution: Before adding HTML, remember that there is a whole thread of PHP methods involved, one (or more) of which evaluate the ID on the image element of the post in the context of a REL value, wp-att-nnn. If it is a problem with all images, then it must boil down to something not being where it is expected to be. Eliminate this problem possibility before weighing down your source page with more (possibly unnecessary) mark-up.
    Last edited by weegillis; 02-06-2012 at 03:18 PM. Reason: REL, not CSS. Oops. / redundant diction

  6. #6
    Member
    Join Date
    Jul 2011
    Posts
    36
    Quote Originally Posted by chrisJumbo View Post
    I got 'em. I wonder, is it treating the image like a thumbnail? The index file includes code to display thumbnail images, the single file does not. With my site, I actually include the images as part of the content post. The post within the Wordpress editor looks like:
    Code:
    <img class="alignright size-full wp-image-134" title="logo" 
    src="url to image"  width="220" height="41" alt="logo"/>
    <p>Post content.</p>
    Let me know if that helps.

    cd :O)
    I changed it so that when I use the HTML code to insert images in the content post like you mention above, I still have the same exact problem.

  7. #7
    Moderator chrisJumbo's Avatar
    Join Date
    Oct 2005
    Location
    Near Sacramento, CA
    Posts
    794
    So just so I am clear, you actually added an <img> tag to the post itself with a hard reference to the image, correct?

    When I viewed the current source of the post, the img tag isn't there. When you added the image originally (before reporting the problem), how was it done?

    You might consider making a copy of the single.php, add the block of code that processes the thumbnail from the index.php, use the copy as a page template, make a draft page using that template and see if that corrects the problem.

    I suggest this route since at the moment, that appears to be missing link between the main and single. If that corrects the problem on the draft then you have to ask yourself if making the change permanent to the single.php would cause any unforeseen problems.

    The PHP itself has a lot of custom functions so messing with it to much could be problematic.

  8. #8
    Member
    Join Date
    Jul 2011
    Posts
    36
    I added the following code:
    <img class="alignright size-full wp-image-134" title="logo" src="http://www.pokemonsocial.com/wp-content/uploads/2012/01/blue_eyes_by_twime777-d4iyaap.png" width="126" height="102" alt="logo"/>
    That code will show on the home page of my website with the image showing, but I think that you couldn't see it because that <img> code does not show on the single post page at all.. :/

    When I added the image before replying to this tread, I would use the "set featured image" on the "new post page" in the Wordpress Dashboard.


    And I don't understand. What "block of code" would I take from index.php?

    I tried copying the stuff from <div id="entry-content-container"></div> from the index.php into the single.php but that didn't do anything.

    I also tested the <img> tag inside the single.php template to see if the image would show, and it did show but of course I had to take it down because it would show on all pages.

  9. #9
    Moderator chrisJumbo's Avatar
    Join Date
    Oct 2005
    Location
    Near Sacramento, CA
    Posts
    794
    Try this to start. You want to add this directly above the <?php the_content( ); ?> line in Single.php. It is always best to make a copy before modifying template files. If this completely screws it up you can just restore the copy.

    Code:
    <?php
    if ( has_post_thumbnail() ) 
    	{
    	get_the_post_thumbnail(get_the_ID(), array(150,150) );
    	} 
    ?>
    If this works then we can add back in the part of the code that makes the image an <a href> link.

    Let me know.
    cd :O)

  10. #10
    Member
    Join Date
    Jul 2011
    Posts
    36
    Quote Originally Posted by chrisJumbo View Post
    Try this to start. You want to add this directly above the <?php the_content( ); ?> line in Single.php. It is always best to make a copy before modifying template files. If this completely screws it up you can just restore the copy.

    Code:
    <?php
    if ( has_post_thumbnail() ) 
    	{
    	get_the_post_thumbnail(get_the_ID(), array(150,150) );
    	} 
    ?>
    If this works then we can add back in the part of the code that makes the image an <a href> link.

    Let me know.
    cd :O)

    Yes, I have a backup of the files. Okay, I tried adding that code right above the <?php the_content( ); ?> but nothing happened.

    I don't know if this helps or not, I got a new post on my website recently. Two pictures were linked to the page (both from linked to Photobucket) On the home page, both pictures show. On the single page ONE of the pictures shows and the other does not show (for the image that does not show, the code does not even show.) Both of the code for the two pictures are input in the same exact way if you look at the home page.

    Here is the link to that post.
    pokemonsocial.com/we-were-just-kids-we-were-just-trainers/


    And on my latest post today, the same thing happened. On the single page, the first image does not show, but the second one does. And on the home page, both images show.
    pokemonsocial.com/littlecup-challenge/
    Last edited by kyle246; 02-07-2012 at 01:10 PM. Reason: added more info

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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