Home mail me! Syndication

Peng

This is my collection of How To …






How to use Lorelle VanFossen’s tip on WordPress excerpts

“How to use Lorelle VanFossen’s tip on WordPress excerpts” 

This is the two pages at Lorelle’s blog that I read, this is the first page and this is the second page.  The code provided on the second page is listed directly here: 

<!-- Start of the Loop -->
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if ( $post->post_excerpt ) : // If there is an explicitly defined excerpt ?>
<div class="excerpt-post clearfix">
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" accesskey="s"><?php the_title(); ?></a>
</h2>
<div class="catslist"><?php the_category(' and '); ?></div>
<div class="entry">
<?php the_excerpt(); ?><br />
<div class="readmore">
<a href="<?php the_permalink(); ?>">CONTINUE READING</a>
</div>
</div> <!--end of entry -->
<!-- <?php trackback_rdf(); ?> -->
</div><!-- end of excerpt-post -->
<?php else : // If there is not an explictly defined excerpt ?>
<div class="excerpt-post clearfix">
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<div class="catslist"><?php the_category(' and '); ?></div>
<div class="entry">
<?php the_content('<span class="readmore">CONTINUE READING</span>'); ?>
</div><!-- end of entry -->
<!-- <?php trackback_rdf(); ?> -->
</div><!-- end of excerpt-post -->
<?php endif; // End the excerpt vs. content "if" statement ?>
<?php endwhile; else: ?>
<h2 class="center">Page Not Found</h2>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<p><?php _e('To help you find the information you seek,
we recommend you check out our
<a title="Camera on the Road Site Map" href="sitemap.php">Site Map</a>
to help track down what you are looking for.'); ?></p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<!--end Loop -->

I didn’t like the CONTINUE READING style so I swapped this line:

<a href=”<?php the_permalink(); ?>”>CONTINUE READING</a>

to this one:

<p align=”right”><a href=”<?php the_permalink(); ?>”>Show me the post now . . .</a></p>

I did the same for the other lines where CONTINUE READING is set.

<?php the_content(‘<span class=”readmore”>CONTINUE READING</span>’); ?>

with this

<?php the_content(‘<p align=”right”><span class=”readmore”>Show me the post now . . .</span></p>’); ?>

And for the line near the bottom that says:

<a title=”Camera on the Road Site Map” href=”sitemap.php”>Site Map</a>

I replace it with:

<a title=”Casey collection of How to” href=”sitemap.php”>Site Map</a>

Actually I have not got my site map set up yet. I’ll have to note that down on my to-do list:

  1. Add a site map here.
  2. Find out how to change my css so that my sidebar 1 and sidebar 2 will flank the main content rather than both sidebar 1 and sidear 2 flushed on the right.
  3. Find out how to bring in comment exerpts into the main display.

So watch this space as I journey into the above learning opportunities.

DISCLAIMER:

I susbscribe to Mr. T. Harv Eker’s teachings, that is; Please DO NOT believe a word I say. The reason I say this is because what I say came from my and ONLY MY own experiences. It does not make it right, it does not make it wrong. You are advised to test and verify them for yourselves. If it works for you, please carry on doing it. If it does not work for you, please throw it out. If you learn something new; for which I am sure you would, please leave me a comment and contact, so that I too can learn from you.

Copyright 2009 (R) Casey @ http://limpengheng.com/how-to

No comments yet »

Your comment

HTML-Tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>