Worked perfectly for me!!
Code will bring the posts(under CPT UI) to any page template.
<?php
$loop = new WP_Query( array(
'post_type' => 'specialoffers',
'cat' => '12', // Whatever the category ID is for your aerial category
'posts_per_page' => 10,
'orderby' => 'date', // Purely optional - just for some ordering
'order' => 'DESC' // Ditto
) );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
Related Posts:
- How to show all posts of the category in wordpress?
- Get category id from post id of a custom post type
- How to show related posts by category or custom post type?
- Structuring a product catalogue in WordPress [closed]
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- How to get the post type from a category id?
- Show custom post type filtered by category
- Showing posts from different categories and from custom post type
- Add custom post type settings to wordress default posts
- Problem with displaying posts in the CPT category
- Set a checkmark in a category based on a URL-parameter
- Get the category from custom post type
- Custom Post Slug same as Parents Category Slug
- How can I show 1 featured post in a styled element, and the next few below differently styled
- WP the_posts() on single-cars.php get category link
- Create new custom post and post category of same name
- Custom post types and ‘new WP_Query’
- How to Display Posts From Category Within a Custom Taxonomy?
- Showing custom post type categories in the menu
- Stores category posts in an array
- Restrict category access to specific users/groups. Author always has access
- Post Query not working
- Use post in multiple places on a page with multiple posts
- Am I mixing up the concept of posts pages and categories?
- Display all Categories except ones with a specific parent
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Post category behave like a Post in back office menu
- Save data is post using php front end
- How to show posts of the same category on a page?
- How to manage a dynamic multi-level page hierearchy system?
- Custom Post By Category
- Change Custom Post Type to Post + Category
- Only show current category post
- Post Editor: display categories from current post type taxonomy only?
- Custom Post Type used for FAQs Accordion
- Display all post types together
- show only one category posts in admin
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- Display posts of only a certain category in WP Admin section?
- Open Custom Post Type as PDF
- Using The REST API How To Pull All Custom Posts?
- Group posts by custom post type
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Display all posts in main category and 1 subcategory
- Replace li Items with divs with classes
- showing custom post types of a certain category only
- Get posts from a custom post type by child categories of a parent category
- Linking to the most recent post in a Custom Post Type
- Custom Post Type Archive Page Filtering
- Show the same Article Available in Other Categories
- Show category ID on custom post type
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- get_posts() with custom post type does not work outside page.php
- Posts from all the categories are being displayed instead of particular category
- Display only one post each WEEK
- Get parent categories of custom post type
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- How to query_post custom posts within default taxonomy?
- Conditional Statement custom post type category
- Custom Post Type With Categories
- create parent post using wp_insert_post
- Display posts from Custom Post Type in category page on front-end
- Turn on and off custom post type from admin?
- Missing Posts in Custom Taxonomy List
- Display random posts, but omit the post it is on?
- Categories sorting
- How can I make my custom posts appear in their assigned category url?
- How to call in Custom Post-Type Categories?
- Allow user to set custom order to a list of custom taxonomies?
- get_category_parents for custom post type taxonomy
- How do I do this with WordPress? Taxonomies?
- Disable block with taxonomies at post page
- I would like to have different styles for my posts based on the content of each post
- Separate custom categories from default category
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- forming WP_Query for posts of all post types but from specific categories
- wp_list_categories() – current-cat class also inside posts?
- Get latest 3 posts from multiple CPT in one query
- Custom post type getting wrong categories and tags
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Which post does a taxonomy term belongs to?
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- List custom taxonomy specific to one custom post type
- Show a Category X’s custom post type on Category X archive page?
- Post image in WordPress not appearing on home page
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Meta query for custom post type ignored in main query
- Changing custom type name hides the posts
- Display Ad on Specific Categories
- Hiding posts by other users and non-logged in
- PHP variable not regenerating when publishing multiple posts at the same time
- Multiple level category drop-down from the WordPress dashboard
- Update Post Meta for a logged in user
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Add custom field to Posts and sort by it