Learn Tutorials Point - LTP > 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 fetch custom post and custom post field data in WordPress.
<?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(); } ?>
Author: Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.
Trending Posts
Tags
ACF
Ading custom columns
admin
Bootstrap
Cart Price
categories
Change Price
class
Code
comments
Create
Creating custom post Type
CSS
current
custom
Customizing
Custom Post
Custom Post Type
Custom Taxonomy
database
Date
Fatch
form
function
HTML
Image
Install
javascript
jQuery
Menu
PHP
Post
Post Type
Price
product
responsive
Resular price
Single product
Table
taxonomy
Theme
Title
woocommerce
Wordpress
Wordpress Code