Read more.
-
Help, I cannot figure out how to get my posts just to have the first part on the home page, and the link to read more. I wish to just have the beginning of the post on the home page, and then to go to the post page to see the rest of the post and the comments.
-
Change
<?php the_content(); ?>to
<?php the_excerpt(); ?>in the index.php of your theme.
Wow, that was quick!! I’m going to see if I can figure that out now.
I’m not quite sure exactly where to put it, this is my index.php, I’m a newbe, and sorry if I sound stupid.
<?php get_header(); ?>
<!– CONTENT –>
<div id=”content-wrapper”>
<div id=”content”><?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<h1>” rel=”bookmark” title=”<?php _e(‘Permanent Link to ‘,’emerald_stretch’); ?><?php the_title(); ?>”><?php the_title(); ?></h1>
<?php the_content(__(‘Read the rest of this post »’,’emerald_stretch’)); ?>
<p id=”postmeta”>
<img src=”<?php bloginfo(‘template_directory’); ?>/img/calendar.gif” />/<?php the_time(‘Y’) ?>/<?php the_time(‘m’) ?>/” title=”<?php _e(‘View all posts for the month of’,’emerald_stretch’); ?> <?php the_time(__(‘F, Y’,’emerald_stretch’)) ?>”><?php the_time(__(‘F j, Y’,’emerald_stretch’)) ?>
<img src=”<?php bloginfo(‘template_directory’); ?>/img/tag.gif” /><?php the_tags(__(‘Tags’,’emerald_stretch’) . ‘: ‘, ‘, ‘, ‘ ‘); ?>
<?php _e(‘Posted in’, ’emerald_stretch’); ?>: <?php the_category(‘, ‘) ?>
<img src=”<?php bloginfo(‘template_directory’); ?>/img/comments.gif” /><?php comments_popup_link(__(‘No Comments’,’emerald_stretch’), __(‘One Comment’,’emerald_stretch’), __(‘% Comments’,’emerald_stretch’), ”, __(‘Comments Closed’, ’emerald_stretch’)); ?>
<span class=”editlink”><?php edit_post_link(__(‘Edit’,’emerald_stretch’),”,”); ?></span>
</p><?php endwhile; ?>
<ul class=”postnav”>
<li class=”left”><?php next_posts_link(__(‘« Older Entries’,’emerald_stretch’)) ?>
<li class=”right”><?php previous_posts_link(__(‘Newer Entries »’,’emerald_stretch’)) ?><?php else : ?>
<h1><?php _e(‘Oops! This blog is brand new’,’emerald_stretch’); ?></h1>
<p><?php _e(‘No posts were found.’,’emerald_stretch’); ?></p>
<?php endif; ?></div>
<!– /CONTENT –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>Replace this line:
<?php the_content(__('Read the rest of this post »','emerald_stretch')); ?>with:
<?php the_excerpt(__('Read the rest of this post »','emerald_stretch')); ?>I thought that might be it, but there was just too much information in it compared to the the simple line that you had said to change. sorry I feel like I know nothing at all in all of this. I’ll see if I can get it done without messing things up. lol
I feel like I know nothing at all in all of this
You may not right now but you will if you keep at it 🙂
Just copy and paste, you can’t mess anything up doing that.
If it’s not one thing it’s another!! Before I could make the change I had to change the permissions. Simple… but when I tried to open my FTP client, it wouldn’t. I don’t know what has happened to it, but I guess I will have to reinstall it. I have restarted, rebooted, and still it is crashing when it tries to open??? never had a problem with it before. Weird???
That worked great to get only an excerpt of the post! So now the reader just has to click on the post title to read the entire post. But, I would like to have it like I’ve seen in other blogs where at the end of the excerpt, it has a statement like “read more” or something of that sort. I would like to know how to add that. thanks “thisisedie”, that helped.
Well, another thing you can do is, when you’re typing the post, at the point where you want the “read more” to appear, you can either manually insert
<!--more-->or you can just click the “more” button and that will create a link instead of just displaying dots like the_excerpt does.Incidentally, (I don’t know why it messed them up) but in both of the tags I posted above, this:
»
should be this:
»otherwise it won’t display correctly.
Sorry…. But I don’t know what that means???
I did that wrong I guess. I was trying to quote what part I didn’t understand. it didn’t work.
Highlight that area and then click the b-quote button above.
<Incidentally, (I don’t know why it messed them up) but in both of the tags I posted above, this:
»
should be this:
»
otherwise it won’t display correctly. >
doing somthing wrong?
The topic ‘Read more.’ is closed to new replies.