Support » Fixing WordPress » Read more – customized per post

  • Whatโ€™s Iโ€™m looking for is a simple way to change the read more link depending on the post.


    Post 1
    Bla bla bla bla
    Find out why unbeliever get murdered with an axe tonight!

    Post 2
    Bla bla bal bal
    Read more

    Post 3
    Bla bla bla bla
    Tantalizing isnโ€™t it, read the rest

    And so and so forth

    Is there an easy way to go about this?

    Ta in advance

Viewing 7 replies - 1 through 7 (of 7 total)
  • whooami



    sure.. use a random array, insert the array into the function that takes care of the read more link.

    not sure its an easy thing to do, but it could certainly be done.

    Ive actually seen something like this on a movable type blog.

    You want it truly random, or *more* something you assign to each?

    For the latter you can use custom fields. Just add one to a post with a key of ‘more’ and whatever you want for your more text as the value. Then replace the_content() template tag in your template(s) with:

    $my_more = $post_meta_cache[$post->ID]['more'][0];
    if(empty($my_more)) { $my_more = 'Read more'; }

    This collects the post custom field data for a post and assigns the ‘more’ custom field (if it exists) to $my_more. Then it verifies there’s something in $my_more, and if not sets a default text (‘Read more’). Finally it passes $my_more as your more text.

    A little hacky, but should work.

    simple and works like a charm! thanks

    kaf, that’s just asking for a plugin to be made from it! ๐Ÿ˜‰

    kaf, that’s just asking for a plugin to be made from it! ๐Ÿ˜‰

    No doubt – I think it might be a real hit – spice things up a slight bit. :>)

    Ok… that is very cool idea and then to have actually made into a plugin. ๐Ÿ™‚

    I’ll have to give it a try. All I have right now is “continue reading this entry…”

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Read more – customized per post’ is closed to new replies.