Support » Fixing WordPress » WP 1.5 editing the ‘more’ link

  • elfin

    (@elfin)


    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!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Lorelle

    (@lorelle)

    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.

    Nick Momrik

    (@mtdewvirus)

    hold on….let me test…

    Kafkaesqui

    (@kafkaesqui)

    A version of what I use:

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

    Nick Momrik

    (@mtdewvirus)

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

    Kafkaesqui

    (@kafkaesqui)

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

    :)

    Nick Momrik

    (@mtdewvirus)

    😉

    elfin

    (@elfin)

    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"> ???

    Moderator Michael Adams (mdawaffe)

    (@mdawaffe)

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP 1.5 editing the ‘more’ link’ is closed to new replies.