$pp = new WP_Query(array(
'post_type' => array( 'post', 'custom_type' ),
'orderby' => 'comment_count',
'posts_per_page' => 4
));
Related Posts:
- Display all posts in a custom post type, grouped by a custom taxonomy
- Programmatically publish a post (custom post type) with custom fields
- Get list of registered custom post types
- Echo all meta keys of a custom-post TYPE
- Ordering Posts List By Taxonomy Terms?
- Change slug of registered custom post type in child theme
- Custom post type permalink changing itself every other change
- WordPress Custom Shortcode Conflicting with Media Library
- Creating a gallery custom post type?
- Custom post type archive with pagination?
- Displaying Post Title on Post Edit page?
- Custom post type archive with dynamic taxonomy filtering – is it possible
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Add common Post Actions to Custom Meta Column
- Add information above a custom post type listing of all posts page
- Adding menu_order to CPT admin page
- Custom post type with specific category structure
- Making a Custom Post type only visible to non-users via a specific link
- reference the current category being used in the category.php page
- Search doesn’t find tags or categories in custom post types
- Add custom post type archives to search results?
- CPT Meta Searching
- Custom Post Type not visible on category page
- Rewrite URL for only archive page (custom post type)
- Show Post Thumbnail In Custom Post From Other CPT
- Archive template for custom post type only lists first 10
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Add category attribute to custom shortcode
- Is possible add class for last post of Custom Post Type?
- single-{cpt}.php ignored
- How to customize a permalink (URL) structure?
- Custom post type unintentionally called in every page
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Using Same Slug With Multiple Post Types
- Multiple featured sizes / images / excerpts
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- PHP variable not regenerating when publishing multiple posts at the same time
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- Querying Two Custom Post Types with OR Not Working
- how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
- Sort and filter custom post type posts by custom taxonomy
- Use image gallery like woocommerce in custom post type
- Posts per row on archive page (custom post type)
- Filter widget outputs
- Get post_type by term_id
- How to keep a CPT from being visible on the front end?
- Custom Empty Results page for my Custom Post Type
- How to have permalink like domain.com/term/postname?
- List Posts By Custom Taxonomy
- How can I remove filters from custom post types?
- Building Forums with Custom Post Types
- Custom Query: If One Post Object Field Value Is The Same As Another
- Custom Columns for Custom Post Type Manager
- Group Custom post type in a taxonomy page by its child taxomony
- Custom post type URL
- Loading multiple post content in FancyBox
- sort by name (slug) custom post type
- wp_dropdown_pages with tax_query clause
- Cache issue with WP_Query and custom field filtering
- Custom Post Type nest under a normal WordPress Page
- Building tags and archive using meta from custom post type
- How to save TinyMCE fields on WordPress custom post type?
- Custom post type items open in archives?
- Custom Post Type, Custom Taxonomy Template: How to get current taxonomy name?
- A sports wordpress website
- Custom post category name showing empty
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- How can I write a function that would update any missing specific post metadata?
- Not saving custom taxonomy while using ajax
- Dynamic template page calling shared taxonomies CPT or Plugin post type : how to clone taxonomy for plugin + set up dynamic shortcode
- Show a custom post title in another custom post type in Meta box
- remove duplicate name submenu link from the custom post type
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- Modify Publish Metabox location on CPT
- Convert category to custom post type
- How do I insert a custom post type query after a certain number of recent posts and then resume recent posts?
- how to display new private message to users?
- subtracting the current post form then whole loop, which is generating all CPT titles
- Custom Function to redirect singular post if specific meta field is empty
- Custom taxonomy with custom post type archive page
- How to mix 2 kinds of post types
- Help with Travel Guide Setup
- How to shows CPT which has specific meta key?
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Show custom post type under last posts configuration
- Custom post type taxonomy template and URL confusion
- custom post type loop
- Custom Post save causes 500 error
- Optimise custom post type queries
- Archive page of filtered posts
- Custom post type child of custom post type
- delete custom post type using a submit form
- Custom post type navigation – 404 on page 2
- Problem with custom post type search
- Allow certain part of a page to be easily updated for client?
- Custom post type – columns order
- Custom taxonomy labels won’t display
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- Assign a tag to custom post type using a query
- Categorizing Custom Posts in Bulk Based on Title