Latest Post

How To show custom post and Custom post field data in Wordpress

How To show custom post and Custom post field data in Wordpress


How To show custom post and Custom post field data in Wordpress


// How To fetche custom post and Custom post filed data in wp

<?php
$type = 'unlimited';
$args=array(
'post_type' => $type,
'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()) {
while ($my_query->have_posts()) : $my_query->the_post();
$meta=get_post_meta($my_query->post->ID);
#print_r($meta);
?>
<div class="main">
<div class="view view-eighth">
<div class="image-top1 col-md-2">
<img src="<?php the_post_thumbnail_url('full'); ?>" class="b-lazy img-responsive wp-post-image lazy-hidden" alt="no thumb">
</div>
<div class="mask col-md-10">
<h2><?php the_title(); ?></h2>
<h2><?php the_content(); ?></h2>
<a href="<?php echo get_permalink( $post->ID ); ?>" class="inline info">Read More</a>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_query();
}

?>

No comments