WordPress: Custom “more…” text

Filed in: WordPress — September 16th, 2004

advertisement

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.

Bookmark and Share

Read also:

What do you think? One Response to “WordPress: Custom “more…” text”

Comments Feed | TrackBack URL
  1. #1
    wits0 Says:

    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.

Comments are closed. Submit your comment here