WordPress: Custom “more…” text

Filed in: WordPress — September 16th, 2004

In WordPress, you type <!--more--> in content to separate content to another page. It will display a link with “(more…)” which bring you to follow part of content.

Not all people happy with the dull “more…” text. Thanks to ringmaster. He/She posted a simple trick for Per-post custom “(more…)”.

  1. In WordPress “index.php”, find:
    <?php the_content(); ?>

    Replace the line with:
    <?php
    $somemore = ‘(more…)’;
    $maybemore = get_post_custom_values(‘more’);
    if(count($maybemore) > 0) $somemore = $maybemore[0];
    the_content(‘‘.$somemore.’‘);
    ?>

  2. At the post you want(in Advanced Editing mode) to have custom “more…” text, add a new Custom Field key called “more” and type in the value you want. It will replace “(more…)” with the value you entered.

Like this post? Please share:

Follow me on Twitter and Facebook. Subscribe to free newsletter for updates like this article..

  • wits0

    Incidentally, while there’s no doubt that Word Press is something, I was irked by one simple initial point. Amidst all the hype nobody thought it fit to just say that it requirws a hosted website in some server to work.:!: Wasting the free Bloggers time, iow to look.

  • wits0

    Incidentally, while there’s no doubt that Word Press is something, I was irked by one simple initial point. Amidst all the hype nobody thought it fit to just say that it requirws a hosted website in some server to work.:!: Wasting the free Bloggers time, iow to look.

t
<-- viglink -->