How To show custom post data in categories in WordPress
This code is used for you to create custom posts than after you are getting this data for specific categories than this code working perfectly.
<?php $args=array( 'post_type' => 'unlimited', 'post_status' => 'publish', 'posts_per_page' => -1, 'tax_query' => array( array( 'taxonomy' => 'taxonomy name', 'field' => 'slug', 'terms' => 'categories name', ) ) ); $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); ?> <div class="home-auto-part-title"> <p><?php the_title(); ?></p> </div> <?php endwhile; } ?>
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