From The Excerpt Reloaded by Kaf:
the_excerpt Reloaded, when a post does not contain an excerpt, displays the contents of the post (typically abbreviated), which can be customized on which HTML tags to allow, length of the excerpt (in words), “more…” link, and filtering type.
If you use that plugin, please review:
http://robsnotebook.com/the-excerpt-reloaded
http://wordpressgarage.com/plugins/the-excerpt-reloaded/
Thanks for your prompt reply Michael, I really appreciate it.
I have installed the excerpt_reloaded plugin, but I think the problem is that it is applied to the_content field. In this instance, I would like to be able to apply it to another field I have created using the “more fields” plugin.
Which was this one:
<?php meta(‘body-text’); ?>
Do you know if there is a way of doing that?
Cheers
The more fields plugin author has examples of code at http://labs.dagensskiva.com/plugins/more-fields/#id3
Something like:
<?php
if ($bodytext = get_meta('body-text'))
echo 'Text: ' . $bodytext;
?>
Thanks for your reply Michael. I couldn’t get is working with the excerpt, so I got the PHP developer here to help me out. Here is what he came up with:
<dl>
<?php $temp_query = $wp_query; ?>
<?php if (have_posts()) : ?>
<?php query_posts(array(
'post_status' => 'publish',
'static' => true,
'child_of'=>'254,271,228,237,34',
'post_per_page' => '2',
'showposts' => '2',
)); ?>
<?php static $ctr = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php if ($ctr == "2") { break; } else { ?>
<dt><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></dt>
<dd>
<div class="thumbnail"><?php meta('thumbnail-graphic'); ?></div>
<?php if ($introtext = get_meta('intro-text')){
if (strlen($introtext) > 55){
$words = str_word_count($introtext, 2);
$pos = array_keys($words);
$introtext = substr($introtext, 0, $pos[55]) . '...';
}
echo $introtext;
}
?>
<p><a class="arrowLink" href="<?php the_permalink() ?>">Read more</a></p>
</dd>
<?php $ctr++; }?>
<?php
endwhile;
endif;
$wp_query = $temp_query;
?>
</dl>
Works a treat