0

I am working on wordpress but I have problem when I write
the_content('read more');

then on indexpage each post load full data of post but I want to

but when I am using the_excerpt(); then wordpress return a 10-15 word on index page and when i click for read more or click on title of post then 30-40 words just show without images...

Please help me what should I do?

check here is screenshot

  • Are you saying that you want the post excerpt to appear on the blog posts index, and that you want the full post content to appear on single blog posts? – Chip Bennett Feb 14 '12 at 13:32
4

Assuming that you want the full post content to appear only on single blog posts, and that you want the post excerpt to appear everywhere else, try something like this inside your Loop in index.php:

<?php
if ( is_singular() ) {
    the_content( 'Read More' );
} else {
    the_excerpt();
}
?>

Additional Codex reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.