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?
- How to display regular posts & custom post types that fall under a category using just the generic category template?
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- Problem excluding category from get_next_post
- remove support for ‘Categories’ for a custom post type
- Remove date and category filters when editing custom post types
- Automatic category for a Custom Post Type
- Get the post children count of a post
- Quickest way to get last or oldest post date – WP Query
- How to display the categories of the post? (custom post type)
- Display Custom Category (taxonomy) Name in Custom Post Type
- How to use custom fields to enable sticky posts on custom post types?
- CPT posts listed by category with custom rewrite URL, please help!
- Custom post type and body_class: Remove “blog” class
- Insert HTML inside link in a walker
- Set menu active state for custom posttype and category, given custom taxonomy term
- Show category ID on custom post type
- How to call in Custom Post-Type Categories?
- get_category_parents for custom post type taxonomy
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Remove CPT name from permalink but add %category% instead
- Portfolio Page for Classic Posts
- I am having Trouble to get list of Categories of Custom post Type
- Custom post type and category link together
- Limit the post for differents custom post type in the same wp_query
- Categories filtering in new post
- How can i create an custom post template for an specific post category? [closed]
- how to check if custom post title exists or not?
- Modify previous and next post links to current Authors Other posts
- How can I have different content for different countries?
- Display an authors post on a single page only when they are logged in
- Invalid Taxonomy
- Batch Extract Date from post title and put into ACF custom field
- custom query with custom post type and category slug
- How to add new post using a form to categories when categories are using as menu
- Custom wordpress loop
- Custom post type filter is being applied to all of my posts
- Admin slow on Postlist (over 30k Posts in Database)
- Get_post_custom not fetching value from array wordpress
- What is the best way to structure posts for the same event happening in different years?
- How to display custom field in product description?
- How to output custom post type title on custom page with category next to it?
- Custom page with no headers, footers and its own CSS, Javascript
- SEARCH QUERIES – REVERSE OUTPUT
- Automatic Set Category For A Custom Post Type
- I cannot display custom posts in custom taxonomy
- how to create custom taxonomy drop downs for parents and child
- How to get the posts that my following users are liked?
- How to insert post 6 times after user register like ask.fm
- can’t see categories in appearance-menu-categories
- How To Loop Through list with Custom Post Types
- Custom Post Type + Category archive
- erase post excerpt limitation [×]
- Show custom post type in archive page by category
- Trying to create hierarchy between 3-4 custom post types
- Displaying wp post categories into my custom metabox
- WordPress custom post type post and category links 404
- One set of categories for multiple custom posts
- Choose custom post type template by category
- Are custom posts included when getting a categories’ posts?
- show posts under custom post type with same autj
- How to change post cpt with submit button?