[wp-hackers] Help Needed for latest post from a selected category

Andrew Nacin anacin at gwhatchet.com
Wed Oct 14 19:47:10 UTC 2009


It's actually get_permalink(). Some methods alternatively have an argument
to prevent echoing, such as the_title_attribute('echo=0').

You also need to keep in mind filters and such. See also the note in the
codex for the_content:
http://codex.wordpress.org/Template_Tags/the_content#Alternative_Usage.
Object buffering can always be used as well.

On Wed, Oct 14, 2009 at 15:22, Sharon Chambers <sharon at brewerradio.com>wrote:

> I've found most of the methods have corresponding get_* methods that allow
> you to parse accordingly...
> $content = get_the_content();
> $title = get_the_title();
> $plink = get_the_permalink();
>
>
> -----Original Message-----
> is there any way to get the post title and content and other field like
> time, tag and others as a variable in loop?
> That means, i want the_content(), the_permalink() or whatever in the loop
> as
> a variable and want to show them by echo. is there any method? I didn't
> found :(
> Help me please.
>
> <?php while (have_posts()) : the_post(); ?>
>           <h3><a href="<?php the_permalink() ?>"><?php the_title()?></a>
>           <p><?php the_content()?></p>
> <?php endwhile; ?>
>
>
> _______________________________________________
> 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