How to make wordpress display the full post and not just the excerpt

Status
Not open for further replies.

angelo

New member
Jan 5, 2007
566
1
0
Rating - 100%
41   0   0
this might sound stupid but ive been playing with the code, i just cant make it display the whole post and not just an excerpt.

heres the main index template<?php get_header(); ?>
<?php if ( !is_home() && !is_page() && !is_single() ) { ?><div id="pagetitle"><?php navigation_title(); ?></div><?php } ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php if (!is_page()) { ?><div class="meta">
On <?php the_time('F j, Y'); ?> /
By <?php if (get_the_author_url()) { ?><a href="<?php the_author_url(); ?>"><?php the_author(); ?></a><?php } else { the_author(); } ?> /
<?php if (!is_attachment()) { ?> In <?php the_category(', '); } ?> /
<?php if (!is_single()) { ?><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); } else { ?><a href="#respond">Reply</a>
<?php } edit_post_link('Edit', ' / ', ''); ?>
</div><?php } ?>
<div class="content clear">
<?php if (is_single() || is_page()) { the_content(); } else { $excerpt = explode("[...]",get_the_excerpt()); echo $excerpt[0]; ?> <a class="more-link" href="<?php the_permalink() ?>">More...</a><?php } ?>
<?php link_pages('<p>Pages: ', '</p>', 'number'); ?>
</div>

<?php the_tags('<div class="meta">Tags: ',', ','</div>'); ?>
</div>
<?php if (is_single()) { ?>
<div class="navigation clear">
<div class="alignleft"><?php previous_post_link('%link','« %title') ?></div>
<div class="alignright"><?php next_post_link('%link','%title »') ?></div>
</div>
<div id="commentsection"><?php comments_template('', true); ?></div>
<?php } ?>
<?php endwhile; ?>

<?php if (!is_single()) { ?>
<div class="navigation clear">
<div class="alignleft"><?php previous_posts_link('« Browse Newer Entries') ?></div>
<div class="alignright"><?php next_posts_link('Browse Older Entries »') ?></div>
</div>
<?php } ?>

<?php else: ?>
<div class="post">
<div class="content">
<p>What you're looking for seems to be missing. Try going back, or using the search bar.</p>
</div>
</div>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

ive been editing the bolded section. im not really a php programmer. anyone care to help :)
 


solution

if you want to display the whole post in everywhere ... then u just need to remove this from your code.
<?php if (is_single() || is_page()) { the_content(); } else { $excerpt = explode("[...]",get_the_excerpt()); echo $excerpt[0]; ?> <a class="more-link" href="<?php the_permalink() ?>">More...</a><?php } ?>

and use just
<?php the_content(); ?>
this will show whole post everywhere..

cheers
 
Status
Not open for further replies.