[wp-hackers] Read more link on page going nowhere
Mike Schinkel
mikeschinkel at newclarity.net
Mon Jul 19 16:33:43 UTC 2010
I replied to you forum post.
-Mike
On Jul 19, 2010, at 8:04 AM, "Kris Young" <KrisY at tbs.uk.com> wrote:
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Jasper Frumau
> Sent: 19 July 2010 13:01
> To: wp-hackers at lists.automattic.com
> Subject: [wp-hackers] Read more link on page going nowhere
>
> Hello everyone,
>
> I have been trying to get a working "read more" tag on a page or pages. So
> far I have only managed to get the read more text to show as a link. I have
> been writing about it here:
> http://wordpress.org/support/topic/424684?replies=13#post-1605389 for a
> while now. It has been a monologue so far. I am using the code pasted here
> http://wordpress.pastebin.com/f2xeiD4A as well as in the mentioned
> wordpress.org thread. Somehow the link keeps on sending visitors back to the
> same page showing the text until the "read more" link. I have no idea how I
> can fix this. Does anyone know why
>
> <?php
> //The Query
> query_posts('pagename=portfolio');
> global $more;
> ?>
> <?php while (have_posts()) : the_post(); ?>
> <?php $more = 0;?>
> <div class="post" id="post-<?php the_ID(); ?>">
> <h2><?php the_title(); ?></h2>
> <div class="entry">
>
> <?php the_content('read the rest of this page »'); ?>
>
> it does not work and creats a link
> http://www.domain.com/portfolio/#more-16that leads to nowhere? Can
> this be remedied? Other solutions?
>
> Thanks in advance for any help. Been at it for quite some time now..
>
> Regards,
>
> Jasper
>
> -----
>
> Hi there Jasper, I recommend using the_excerpt. Whether you're doing this for posts or pages, the functionality can be replicated. Most simple way of separating a post/page content block from a 'teaser'.
>
> http://codex.wordpress.org/Excerpt
>
> Kris
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list