Per-post custom “(more…)”
-
You can easily customize the text used for [more] in your posts using the new custom field feature in WP. Find the line in your index.php that says:
<?php the_content(); ?>
And replace it with this:
<?php
$somemore = '(more...)';
$maybemore = get_post_custom_values('more');
if(count($maybemore) > 0) $somemore = $maybemore[0];
the_content('<span class="more">'.$somemore.'</span>');
?>
With that code in place, when you add a custom field called “more” to any post, it will use that text instead of the default. The default is the “(more…)” in the code above.
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Per-post custom “(more…)”’ is closed to new replies.