WordPress.org

Ready to get started?Download WordPress

Forums

Custom field for each post (2 posts)

  1. feilbloggen
    Member
    Posted 2 years ago #

    I am looking for aplugin that allows me to have a custom tekst on the <!-more->-tag. Not just change it, but have the possibility to set the text for each post.

    Anyone know of a plugin that allows me to do that?

  2. MichaelH
    Member
    Posted 2 years ago #

    Well if you don't find a plugin you could use this in your theme's apppropriate template file:

    <?php
    $moretext = get_post_meta($post->ID, 'more_text', true);
    if ( ! $moretext ) {
    $moretext = 'Read the rest of this entry &raquo;';
    }
    the_content($moretext);
    ?>

    Just create a custom field called more_text on the posts where you want a specific "more". If there is no custom field call "more_text" then the code will cause 'Read the rest of this entry &raquo;'; to be used.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.