WordPress.org

Ready to get started?Download WordPress

Forums

How can I change the text displayed by the "more" tag? (13 posts)

  1. trinakriae
    Member
    Posted 2 years ago #

    Hello,

    I am using WordPress with the Yoko 1.0.4 theme.

    I would like to change the text associated with the more tag (the one used to create post excerpts/summaries), for every post I put in the blog. I know already how to modify the more for a single post but I would like to avoid modifying it every time I create a post.

    I found this interesting article, but I cannot find any the_content() tag in any of my theme files, including index.php.

    Anybody knows wheteher the_content() has been replaced by any other tag in recent versions or with the Yoko theme the procedure is different?

    Thanks

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    Look in content.php.

  3. trinakriae
    Member
    Posted 2 years ago #

    Thanks!!! I found the file modified the the_content tag in both content.php and content-single.php but no luck.

    The excerpts message is still the default one...any other file I can try with?

  4. keesiemeijer
    moderator
    Posted 2 years ago #

    In functions.php there is the function yoko_continue_reading_link(). Change it there.

  5. trinakriae
    Member
    Posted 2 years ago #

    I also changed it there...it does not work! This text is hardcoded somewhere else

  6. keesiemeijer
    moderator
    Posted 2 years ago #

    If I make these changes it works:

    content.php (works for <!--more--> tag)- changed to read on

    <?php the_content( __( 'read on', 'yoko' ) ); ?>

    functions.php (works for excerpt)- changed to read on

    function yoko_continue_reading_link() {
    	return ' <a href="'. get_permalink() . '">' . __( 'read on', 'yoko' ) . '</a>';
    }

    Maybe clear your browsers cache and refresh the page.

  7. trinakriae
    Member
    Posted 2 years ago #

    No way it does not work. Morevoer, in the post where I changed it manually just for testing purposes like this:

    from
    <!--more-->

    to
    <!--more But wait, there's more-->

    Even if change the text it is always shown in the post But wait, there's more, even though in the admin HTML editor appears just <!--more-->. In other posts I still get the default message. Why I cannot change the one that I modified manually? Does it store somewhere the manual modification.

  8. keesiemeijer
    moderator
    Posted 2 years ago #

    <!--more But wait, there's more--> is in your post content and doesn't get stored in the database, it's replaced with "But wait, there's more" on the fly. This custom "more" tag in your post content overrides the default message in content.php: <?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>.

  9. trinakriae
    Member
    Posted 2 years ago #

    Yes everything you say is really right and logic. My blog is behaving completely crazy.

    I decided to give up and keep the default message but now I have all the post with default message and just one with a custom message.

    I took out the excerpts, I cleaned the cache, i tested if the excerpts was gone and it was. Than I used the visual editor to add the excerpts, I check in the HTML editor and it displays just the <!--more--> tag.

    I load the blog page and it appears the excerpts with But wait, there's more.

    That is what is upsetting me...where does it take that string from, if there is no trace at all in all the files and I cleaned the cache?

  10. keesiemeijer
    moderator
    Posted 2 years ago #

    Can you give us a link to the page with the "But wait, there's more" as read more text. Very strange?

  11. trinakriae
    Member
    Posted 2 years ago #

    Unfortunately my blog runs in a intranet and it is not available to the WWWs. I let you know if I find a solution. Thanks anyway

  12. esmi
    Forum Moderator
    Posted 2 years ago #

  13. Photog
    Member
    Posted 2 years ago #

    If you want to customise the More tag for each post, you can use the Headspace plugin, http://urbangiraffe.com/plugins/headspace2/

Topic Closed

This topic has been closed to new replies.

About this Topic