You can use the action pre_get_posts
. Just make sure to check is_post_type_archive('question')
and is_admin()
to prevent affect queries in the whole website.
Related Posts:
- How to add multiple images to a custom post type single post?
- How to sort CPT by custom meta value (date), and return posts month by month
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Using WPAlchemy metabox values in another metabox
- How can I create a custom meta box to add an mp4 video to a page?
- Use remove_meta_box conditionally on custom post type
- Displaying a div from an assigned meta_value when on a page
- Retrieving meta-box from a custom-post-type
- Inefficient Query Confusion
- WP_Meta_Query object with conditionals
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- how to compare different timestamps in wp-query for events custom post types?
- Wp Meta Query does not work while simple Query Works
- Metaboxes inside Tab
- Wp Query sort order from custom MetaBox
- How to query custom post then display sections by meta value
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- How to use a custom post type archive as front page?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- Combining queries with different arguments per post type
- How to make a WP_Query search with custom post types?
- The Operator “NOT IN” Does Not Work In tax_query
- Display Custom Post Type Fields
- Admin Post Update Redirection to Posts Screen
- Remove tabs from media uploader for a CPT
- Custom Post type sort order not working in the admin area
- How to get the parent’s taxonomy?
- Priority of Meta Box for Custom Post Type
- WordPress query by multiple Custom fields and order by date
- Unable to filter on field on edit.php page
- Help with hierarchical custom taxonomies and permalinks…almost there
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- How to save the checked boxes?
- New WP_query in template not working with CPT+category on some pages
- Displaying a specific post in a wp query by post id
- Query current and future events, ordered by begin date
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Optimised Code for Pulling Taxonomy Posts
- How can I get the first 50% of all posts (within a custom post type)?
- Remove duplicated values from a loop
- is there a way to retrieve posts that do not have a featured image assigned?
- Related posts in all categories of current post (custom post types)
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- Undefined Variable – Custom Post Type Meta
- shortcode to show custom post types by category
- Genesis filterable portfolio isotope [closed]
- convert custom query to wp_query
- Get parse_query filter to return slug instead of id
- Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
- Custom admin post.php page
- How to use load more custom post type data normal or according to on click category tab In WP
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to use TinyMCE Editor for one of my custom post meta field?
- How to make custom taxonomy into drop down select in a custom metabox
- Custom post type isn’t working
- Add additional field to custom post_type
- Using wp_query to modify the loop in index.php for a CPT
- How to Echo Metadata Value in Currency Format
- Wp Query with multiple custom tag(taxonomy) by get the terms
- Sortable column containing numeric values for Custom Post Type at WordPress Backend
- Problem with $post_id object’s property
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- How to properly use Categories with Custom Post Types
- Displaying Portfolio Filter by Category Order (alphabetically)
- Function to add custom HTML into head in custom post-type list page
- Invalid file type when using wp_upload_bits to upload PDF to a custom post type
- One Custom Post Type two different Templates
- Custom Post Type Query W/Category Dropdown
- Pin posts to top of custom loop
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- WP_Query – How To Query Only Custom Posts With No Children of Their Own?
- How to get custom post type with dynamic ID
- Custom metabox with image gallery upload that won’t attach images to post
- Foreach result into WP_query
- Query custom post type and custom field by URL parameters
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Custom Post Type Query by user id
- CPT post doesnt shows tags and category on backend admin page
- Adding a nav menu for a custom post type
- How to use costum database table for custom post type
- Querying, storing, and using data from 2 separate custom post types
- date_query won’t accept day parameter, but will accept month and year for a custom post
- do action inside a class is not working
- How to add a custom meta box below publish box in CPT that is like publish meta box and can contains html?
- Edit post meta direct from post.php?
- Custom Post ‘Post Per Page’ Crashing Page?
- How to Arrange Support => Thumbnail
- Custom metabox value not saving
- Issue with permalinks for custom post type
- Paged within a custom content type template [duplicate]
- WordPress can only query up to 766
- Query by post type or category
- loop through custom post-type with two meta_keys
- CPT Template Option to Top
- How to exclude certain portfolios from a loop
- Use a Variable in update_post_meta as the $meta_key
- show the most recent date of all posts to display on front end
- Can I add a wordpress page using the slug for a CPT rewrite