Return to Snippet

Revision: 36887
at November 29, 2010 15:56 by baires


Initial Code
<?php
            $custom_post = new WP_Query();
            $custom_post->query('post_type=testimonial&showposts=1&orderby=rand');
?>

<?php while ($custom_post -> have_posts()) : $custom_post -> the_post(); ?>
        
                <div class="post_type">

                        <?php the_content();?>
                        
                        <span class="name right clear">
                                <?php echo get_post_meta($post->ID, 'custom_post_type_name', $single = true); ?>
                        
                                <?php echo get_post_meta($post->ID, 'custom_post_type_title', $single = true); ?>
                                
                        </span>
                        
                </div>
                <?php endwhile; ?>

Initial URL


Initial Description


Initial Title
Random Custom Post

Initial Tags
post, wordpress

Initial Language
PHP