A link to your site would help us to see what’s going on. In particular, it would help us to see if your image is found by your server.
Another possibility is that your theme uses the_excerpt() for displaying posts on the home page. If that’s the case, all images are stripped out of the display.
here is the site , btw those images are link only not in server .no problem in single post page , but in home page its not showing image
Looks to me as though you’ve got a ‘more’ break after the first sentence (and before the “requirements”). So you don’t see anything beyond, “GRave Defense HDv1.9.0” on your first post.
You also have what looks as though it’s meant to be a short code, saying [break] just after the image. It’s being treated as text, though, and not as any kind of a break.
Your other posts are similar, although they don’t show the “[break]” string.
I notice on your second post that the line or paragraph break before “Requirements” is not there, so this suggests to me that your theme is using
the_content(). If I’m right, it means that the HTML is being stripped of things like images. See the Codex entry and read the first paragraph carefully.
Your images are on a server, btw, just not on *your* server 🙂
iam bit confused bro , where to add “the_content()” ? pls clear me bro 🙁
Depends on your theme. You need to find where your theme implements the WordPress Loop. For example, in twentyeleven, it’s in content.php. In twentyten it’s in loop.php. I usually start in index.php and look for what’s being called in there, and follow the trail along until I find the loop.
Once you’ve found the right file, you need to check to see if I’m correct and that your theme is using the_excerpt(). If it is, you’ll want to replace the_excerpt() with the_content(), with the correct parameters, of course.
When you’ve done that, you’ll find that the entire contents of all your posts will appear in place of the teasers that you currently have. If you want to not have the entire content on your blog page, you need to edit your posts and put “More” breaks in at the places where you want the teaser to end. You do that on the Edit Post page in the Dashboard, using the Visual editor (click on the “More” break button with the insert cursor at the point where you want the break to occur).
If your theme is not using the_excerpt(), we’ll have to think again.
If you’re using the ‘protect’ theme, which looks likely from the code I can see, then the index.php file calls a function called
the_post_excerpt()which is a function in the theme’s own functions.php file. This function either gets or creates an excerpt. It’s called like this:
<?php the_post_excerpt($excerpt_length=50); ?>
I’m not sure what will happen if you replace it with the_content(), but you could try it. Just comment the line above out, and add the following immediately after the closing of the comment:
<?php the_content(); ?>
… and we’ll see what happens.
If it completely messes everything up beyond what a bit of CSS and the use of some “More” tags can fix, you can just delete the added call to the_content() and uncomment the call to the_post_excerpt(…).
where to add this bro “<?php the_content(); ?>” in index.php ? (i am not pro in wp ,sorry for noob like Q)
If the suggestions I gave in my last post aren’t enough for you, the question would be, are you confident that you can mess about with PHP files and deal with the consequences if things go wrong? I’m not suggesting you shouldn’t try, but you need to be happy you can fix things if they fall over.
But, assuming you are happy and that you’re using the ‘protect’ theme, you simply do as I said before. You look for the existing call(s) to
get_the_post_excerpt(...)and replace them with call(s) to
the_content()in (from what I can see) index.php.
You need to take all the usual precautions, like having backups, especially of the index.php file, commenting out the old code rather than removing it, making all your changes in a Child Theme and so on. The standard stuff that developers do to minimise the risk that they’re going to break something. Remember, I didn’t write this theme. I just downloaded it and took a quick look, so it could be doing something quite unexpected that I haven’t picked up on. We’ll never know until we try.
You also need to be prepared to do some fairly serious reformatting of the output: firstly by using ‘More’ tags in your posts, but also some amount of CSS work because what’s being output from
the_content()is likely to be quite a bit different from the current output.
If you’re not using the ‘protect’ theme then if you let me know what theme you are using I’ll take a look to see if I can see where the excerpt is being obtained.
For people who are not comfortable messing around with HTML/CSS/PHP it’s probably best to stick with what the theme offers in the way of configuration. Either that or do some serious study in th field. It’s not hard to learn, but it does take some effort.
thx for your great kindness bro ,pls edit for me if you has time , say which php file sud i give .
Well, I’ve already said it twice, but, “Tri chynnig i Gymro” as we say in this part of the world (three tries for a Welshman).
If you’re using the ‘protect’ theme you need to edit the theme’s index.php file.
If you’re not using the ‘protect’ theme, please post what theme you are using and I’ll try to find out what you need to do in that one.
OMG you are the man . Now its showing image bro but the image size is too small .pls say the way to make it big bro .
The img tag specifies a width of 100px.
Is this an image you’ve added to the article in the Post editor, or is it a “Featured Image”?
This article (scroll to the end) explains how to set the size of a featured image.
If it’s just an image you inserted into your post, edit your post, hover over the image and then click on the ‘edit’ icon. In the resulting dialog select the appropriate size: probably ‘full size’ if you’ve uploaded an image of the size you require, which is always the sensible thing to do in order to avoid the browser having to waste time resizing the image.
bro its ok in post but in homepage its small (its not featured image)
Then something is setting the width to 100px.
Your theme calls
the_post_thumbnail(), so you could try replacing the first parameter with the string ‘full’, like this:
the_post_thumbnail('full', array('class' => 'alignleft')
No idea if it’ll work, but you can try it.
- The topic ‘No image’ is closed to new replies.