[wp-hackers] the_content() and more link
Computer Guru
computerguru at neosmart.net
Thu May 31 17:19:35 GMT 2007
<?php
$text = preg_replace('/(.+)<p><a href="([^"]+)">Continue
reading<\/a><\/p>/i', '\\1<a href="\\2">Continue reading</a>',
the_content('Continue reading "'. the_title("","",false).'"'));
?>
On 5/31/07, James Davis <james at freecharity.org.uk> wrote:
> I'm currently using the following code in a theme.
>
> <?php the_content('Continue reading "'. the_title("","",false).'"'); ?>
>
> It outputs something like
>
> blah blah blah content blah blah blah
> <p><a href="linktomore">Continue reading</a></p>
>
> Is there a way to avoid these paragraph tags and instead output
> something similar to
>
> blah blah blah content blah blah blah
> <a href="linktomore">Continue reading</a>
>
> Thanks,
>
> James
>
> --
> http://www.freecharity.org.uk/ - Free IT services for charities
> http://www.freecharity.org.uk/wiki/ - The VCSWiki
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
Computer Guru
Founder
NeoSmart Technologies
http://neosmart.net/blog/
More information about the wp-hackers
mailing list