Pages

How To Get The Custom Post Type Content in Wordpress

Tuesday, 7 January 2014

How To Get The Custom Post Type Content in Wordpress
How To Get The Custom Post Type Content in Wordpress

<?php
$catquery = new WP_Query( 'posts_per_page=8&post_type=homepage' );
while($catquery->have_posts()) : $catquery->the_post();
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'thumbnail') );
?>
<li>
<a href="<?php echo post_permalink($post->ID); ?> "><img src="<?php echo $url; ?>" alt="Banners" class="panelImg" data-src-active="/data/text/promos/banners-vertical.jpg"></a>
<?php
the_content();
?>
</li>
<?php endwhile; ?> 
 

Most Reading