The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Customizing '(more...)' even more (5 posts)

  1. sdiver
    Posted 11 years ago #

    I'm looking to customize the (more...) tag a bit futher, and I'm sure this will help some other people out as well. Basically, what I would like to do is replace the '(more...)' tag with the following...

    "Continue Reading: POST TITLE"

    ...or something like that.

    I have seen the posts explaining how to change the '(more...)' link in 'template-functions-posts.php' to some other text, and that works. But I want to ad the post's title in there as well, and adding <?php the_title(); ?> in the '$more_link_text' section of 'template-functions-posts.php' does nothing. I am a PHP newbie, so I have no doubts I am messing something up here, but there seems as though there should be a way to do this with PHP...I'm just not knowledgeable to know how to do it.

  2. DianeV
    Posted 11 years ago #

    I don't recall what file the more tag is in.

    If you have the capability (and WP is also on your hard drive), search the WP folder for the more tag ... you'll be able to change the link text there.

  3. sdiver
    Posted 11 years ago #

    I have found, and can change the '(more...)' link to display different text without problem. What I want to do is make it so that if my post contains the '<!--more-->' code so that it spills over onto another page, then that '(more...)' link at the bottom of my post reads something along the lines of:

    Continue reading "TITLE OF POST HERE"

    So that each '(more...)' tag is effectively a unique link that contains the title of the post in it. I'm sure this can be done by editing the PHP code somewhere, but as I said, I'm a PHP-newbie...not sure where I would go about doing that.

  4. eragle
    Posted 11 years ago #

    I changed mine to an image. Works really well.

  5. rustin
    Posted 11 years ago #

    I'm not a real PHP guy so somebody please correct me if I'm wrong...

    but I would think you could just do something like:

    <?php the_content(__('read more of')); ?> <?php the_title(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.