Support » Fixing WordPress » Change the (more…) text in posts?

  • When using the “More” button (tag) in a post the output is (more…)
    Is it possible to change the text from “more…” to something else like “Full Story…” ?
    Thanx,
    Joe.

Viewing 15 replies - 1 through 15 (of 16 total)
  • YES! I know that one! 🙂
    Nice to be able to give an answer instead of all the questions (and more in my mind…)
    When you open up the template-functions-post.php page in /wp-includes, you will find the strings (more…) somewhere down the page. Just change them into what you like 🙂

    Change the more link text
    function the_content($more_link_text = ‘(more…)’, $stripteaser = 0, $more_file = ”) {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);
    echo $content;
    }

    🙁 Your answer was even better prara 🙂 Have to copy that code and make it into an plugin.

    Be sure to rename the function or whatever method you use to make a plugin.

    Thread Starter superspiker

    (@superspiker)

    Thank you for the quick relpys…
    I would assume that the best method is to create a plugin because otherwise the default (more…) would reapply if I were to do a future upgrade.
    Thanx everyone.
    Joe.

    Hmm, I thought too simple about making something like a plugin, so I put the code first in my-hack.php, cause I thought it would overrule the original function. But then I get the warning of not being able to redefine etc. So I renamed the function in the my-hack file, but that’s not enough is it?

    http://www.blindmuse.com/archive/2004/02/26/add-wordimage-counts-to-wp/
    Works in 1.01, not sure which version you guys are using. It allows you to change the text as well as add word/image counts to the text.

    I would have thought the easiest way would be to alter the parameters in index.php:
    <?php the_content ('Full Story...') ?>
    Does that no longer work in 1.2?

    Does anyone know what template to modify the “more” link so I can declare it in my .CSS? I currently have everything I post in a “postcontent” class. That way all URL’s have a linky graphic next to it. I don’t want the linky graphic next to the more, but I want to be able to write extended entries.
    Any help would be great, thanks!
    Sara

    Thanks Beel! I will try that! See, I knew it was obvious to someone but myself! 🙂

    Is there a way to include metadata with the more tag? For example, at the bottom of the teaser there would be the link that says “Continue reading” (and perhaps the entry title) and also information about the entry – number of words, or size in kilobytes. So it would look something like this:
    Continue reading [entry title]
    532 words / 5.6k
    Simply typing the information manually in the post makes it part of the permalink, which is not desired. Can anyone point me in the right direction? What function would I need to modify?

    This works by automatically showing the number of words when the –more– tag is used:
    http://www.blindmuse.com/blog/2004/05/24/addword-image-counts-to-wp-12/

    <div id=”postCounts”>
    <?php the_content(‘Continue reading’, ”, ”); ?>
    </div>

    Sounds good, but I can’t seem to get it to work. I followed the instructions exactly. I use an external stylesheet. Here’s how the index.php looks:
    <div id=”postCounts”>
    <?php the_content(‘Continue reading’, ”, ”); ?>
    </div>

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Change the (more…) text in posts?’ is closed to new replies.