Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Need Help With WordPress

Can't get images to appear on main page



2:40 pm on May 16, 2010 (gmt 0)

5+ Year Member

Not sure if this is the right place to post this, so please let me know if not.

I am new to WordPress and have done pretty well so far getting it installed at my domain, installed a theme (Mimbo 3.0) along with a bunch of plugins, etc.

My magazine-style theme allows for pictures or thumbnails to appear along with a snippet of text on the main page. My problem is that I can't get the images to appear . . . not even sure what I am supposed to do to make that happen. I have posted questions at the WordPress.org forum, looked through theme FAQs, searched Google and still can't seem to find the answer. I have installed and uninstalled several plugins and none of them seem to work.

Not sure if it is a problem with a plugin, page coding or user error. Likely I need someone to hold my hand through the process. How do I find a WordPress expert who can help me with this?


2:53 pm on May 16, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

need a bit more info. where do the images come from? if the images are associated with each post then presumabely you upload them everytime you make a post. if they are generic icon-type things, then where are you storing them?

maybe you should look at the source code first, and see if there's an <img> tag, and what the URL is pointing at.


3:12 pm on May 16, 2010 (gmt 0)

5+ Year Member

The images have come from several places. Some are my own, some are stock that I purchased. And yes, I have uploaded them with the posts and they show up in the posts themselves fine. With my theme, it pulls the last X-number of posts to the main page. As I said, the snippets of text from the posts show up fine, but it doesn't pull the images.

Not sure if looking at the code will help since it is all done in PHP and there seems to be different pieces of code all over the place that get pulled together to form the main page (unlike a good old-fashioned HTML page). The info I am finding online seems to point to it being a problem with a WordPress plugin, which is why I am looking for a WP expert to walk me through it. I am willing to pay for the right person because I know it will save me any additional hours struggling with this mess. The only thing is, I don't know how to go about finding a legitimate WP expert.


3:28 pm on May 16, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

you dont have to pay anyone, it should be pretty easy for us to tell you.
have a look at the index.php page in your theme. it sounds like there's probably a line there that says something like

thats the bit that prints out the words for each post.

paste the code either side of it here, so we can see what it says (straight from the php file, not the source code).


actually... it would be easier if you just try this...
uninstall the plugin that is supposed to print the image.
and then open up the functions.php file in your theme's directory.
paste this into it...

function post_image(){$a=1;global $b;$b=1;$c=get_permalink();$d=get_the_content();



$k=preg_replace('/width="([0-9]*)" height="([0-9]*)"/','',$k);$l[$i]=$k;$f=$j+1;}

if(stristr($l[$a],'<img')){echo'<a href="'.$c.'">'.$l[$a]."</a>";}$b=0;}

and then open up the index.php page in your theme's directory, and paste this where you want the image to appear -- probably somewhere near where it says

<?php post_image(); ?>

and then it should work


4:50 pm on May 16, 2010 (gmt 0)

5+ Year Member

Thanks I will look at the functions.php in a minute.

Here is the code that I think defines the top "feature" post:

$postCount = 0;
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts( 'paged=$page&post_per_page=-1&cat=' . get_query_var('cat') );
while (have_posts()) { the_post();
if( $postcount == 0 ) {

<div id="lead" class="clearfloat">

<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php echo get_post_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&amp;w=260&amp;h=230&amp;src='); ?></a>

<div id="lead-text">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php the_title(); ?></a> <span class="commentcount"> (<?php comments_popup_link('0', '1', '%'); ?>)</span></h2>

<p class="date"><?php the_time('n/d/y'); ?> &bull; </p>
<?php the_excerpt(); ?>


9:18 pm on May 16, 2010 (gmt 0)

5+ Year Member

Not sure what I did, but it seems to be working now. Many thanks for your suggestions!

I now understand the love/hate relationship some people have with WordPress.

Featured Threads

Hot Threads This Week

Hot Threads This Month