Retrieving all posts titles with its custom fields values one one page...
Any ideas?
Retrieving all posts titles with its custom fields values one one page...
Any ideas?
thanks but these are according to specific custom field or it's value.
I found no specification how to do it FOR ALL posts' fields and values
for ALL posts, for instancs, use 'posts_per_page=-1' in query_posts; or 'numberposts=-1' in get_posts.
read the docu.
<?php
$args=array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
echo 'List of Posts';
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
<?php
the_meta();
endwhile;
}
wp_reset_query(); // Restore global post data stomped by the_post().
?>great! thanks!
This topic has been closed to new replies.