WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pages loose template images (10 posts)

  1. thehowellsnest
    Member
    Posted 4 years ago #

    Hello,

    For some reason on my site if i got to a page all the images get the path /public_html/page/wp-content/themes/howellsnest/images/name.gif but if i view it from the homepage it works fine.

    anyone got any ideas?
    Rich

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Site url?

  3. thehowellsnest
    Member
    Posted 4 years ago #

    http://www.thehowellsnest.com if you go to the bottom and click older posts it happens, if you click a page from the menu it does it.

    Rich

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Which images are you referring to? I couldn't find any with that path in them - although I did notice that you have a single space in your theme name (howells nest) which really needs to be removed.

  5. thehowellsnest
    Member
    Posted 4 years ago #

    Okay, i have had a look and it still happens. If you look at this image (http://localhostr.com/files/3fe624/thnerror.JPG) the top shows the homepage and the lower section shows the page after i clicked the older stories link (http://www.thehowellsnest.com/page/2) as you can see the areas marked in red have images missing, on Rich News on the left their should be a image with the path (http://www.thehowellsnest.com/wp-content/themes/howells%20nest/images/richardthumb.gif) but when i click the older stories link it changes it to http://www.thehowellsnest.com/page/wp-content/themes/howells%20nest/images/richardthumb.gif

    Also i will remove the single space in the theme name i hope this wont break anything. Will more than likely need some hard code changing.

    Hope this isnt too confusing.
    Rich

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    Looks like either your theme or a plugin that you're using to display featured content (or both) is broken. When a featured image is added to the page, it's being inserted with a relative path. When images are being added to the inline style, the link is to images folder in the theme instead of the post attachment image.

    Are the featured posts part of your theme or a plugin?

  7. thehowellsnest
    Member
    Posted 4 years ago #

    By featured posts do u mean the content down the left hand side?

  8. thehowellsnest
    Member
    Posted 4 years ago #

    I think i have found the problem, i have the following code

    <h2>Rich News</h2>
    
    					<?php $temp_query = $wp_query; ?>
    					<?php query_posts('cat=6&showposts=2'); ?>
    					<?php while (have_posts()) : the_post(); ?>
    					<a href="<?php the_permalink() ?>"><img src="wp-content/themes/howellsnest/images/richardthumb.gif" width="86" height="88" alt="" /></a>

    I dont know why this is a permalink can it be changed do you think?

  9. esmi
    Forum Moderator
    Posted 4 years ago #

    Try changing it to:

    <h2>Rich News</h2>
    <?php $temp_query = $wp_query; ?>
    <?php query_posts('cat=6&showposts=2'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_directory'); ?>/images/richardthumb.gif" width="86" height="88" alt="" /></a>

    which takes out the hardcoded relative image location. WP doesn't handle relative links very well.

    the_permalink is fine. It just points to a featured post. You could just remove the entire link if you want to.

  10. thehowellsnest
    Member
    Posted 4 years ago #

    That seems to have fixed it :) Brilliant :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.