Forums

WP 1.5 editing the 'more' link (9 posts)

  1. elfin
    Moderator
    Posted 7 years ago #

    I currently have:
    <?php the_content(__('Read more about this article')); ?>

    However I want to be able to include the title of the article. All the things that worked with 1.2 don't seem to work for me with 1.5.

    I realise I need to use the_title but am unsure as to the correct way to change it.

    Can anyone tell me how to get it to work!

  2. Lorelle
    Member
    Posted 7 years ago #

    This is a tough one. Basically you want:

    <?php the_content('Continue reading <?php the_title(); ?>...'); ?>

    Which won't work in that form, so don't try it. I'm not good at breaking up php code, so maybe someone here can do it.

  3. Nick Momrik
    Member
    Posted 7 years ago #

    hold on....let me test...

  4. Kafkaesqui
    Moderator
    Posted 7 years ago #

    A version of what I use:

    <?php the_content("Continue reading $post->post_title"); ?>

  5. Nick Momrik
    Member
    Posted 7 years ago #

    <?php the_content("Continue reading " . the_title() ); ?>

  6. Kafkaesqui
    Moderator
    Posted 7 years ago #

    Fascinating how you can often do the same thing through different means, eh?

    :)

  7. Nick Momrik
    Member
    Posted 7 years ago #

    ;-)

  8. elfin
    Moderator
    Posted 7 years ago #

    Kafkaesqui, thanks your method worked.

    MtDewVirus, yours didn't, though that had worked in 1.2 . The the_title was added in, but came immediately after the<div class="storycontent"> ???

  9. Michael Adams (mdawaffe)
    Member
    Posted 7 years ago #

    the_title echoes by default. To use MtDewVirus' method, try:

    <?php the_content('Continue reading ' . the_title('','',FALSE) ); ?>

    I haven't tried it myself, though.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.