Categories by default only show posts, as do tags. This limitation is not enforced on custom taxonomies, and it can be overriden via a filter.
If you place this into your functions.php, then posts of type help-line
will be shown in the listings.
// before we grab the posts in a query
add_filter('pre_get_posts', 'wpse49960_query_post_type');
function wpse49960_query_post_type($query) {
// if it's a category/tag archive, and there are no 'suppress_filters'
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
// then set the 'post_type' query var so that it includes our custom post type, not just 'post'
$query->set( 'post_type', array(
'post', 'help-line','nav_menu_item'
));
return $query;
}
}
Also, for which template wordpress loads, see here:
Related Posts:
- How to solve suspected memory issue in custom WordPress loop?
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Get_post_meta() won’t return value
- Display custom post on home page based on a metabox selection
- wp_query to find posts by year and month
- Create a random unique 6 digit number as custom field for custom post type
- How to insert content from another Custom Post type into Post?
- WP_Query orderby modified to include custom meta changes
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Meta Key Value in current-user-only loop
- Calculate all custom field values in the post loop
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- How to conditionally add Custom Post Type to Front Page
- hide specific div on single.php [closed]
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- How do you output an unknown number of images in a custom post type with desired markup?
- Get data from PHP to JavaScript to set position of each post on front page
- Get post content from another section in custom single page
- Displaying information from custom field on custom post type
- Get post-meta value of all custom-posts – lowest to highest year-count?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- How do I list a custom field and custom taxonomies for each result in a loop?
- How can i loop through custom post type according to custom meta field?
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- when looping through custom post data not appearing
- How to avoid duplicate posts queried from custom meta?
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Adding a Section for Visitors
- sorting in wp query based on custom field value
- Custom taxonomy template for custom fields loop [closed]
- Sort loop by custom field from different post type
- WordPress query in which condition uses custom field
- WordPress loop add heading before first of type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Error in WP Query. If variable is empty it is displaying previous post value
- WordPress loop, show only one post per custom field
- How to get past and upcoming post by defining date in custom field?
- Order by custom field attribute
- Get result from Custom Field in Custom Post type
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- loop through custom post-type with two meta_keys
- How do I filter a custom post type loop by a field?
- Automatically set post title to same value as a meta box
- How to get all custom fields of any post type
- WordPress “Loop” with large set of results
- Use Custom Post Type as Custom Field
- Conditional two level dropdown filter for custom post type
- Saving multiple Metabox contents
- Show all custom post type posts sorted by custom taxonomy then by another custom taxonomy
- Custom post type / custom fields
- How do you output custom code between posts in the loop?
- Assign Taxonomy Based on Custom Field Value
- Assigning the same custom meta box to multiple post types
- get_template_part for each level of taxonomy term
- window.send_to_editor and jQuery .attr() conflicts with multiple custom upload image meta boxes
- Filtering custom post type on a combination of custom taxonomies and custom fields?
- How do i calculate the total of values of custom fields in custom post types?
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- Show custom post type relationships by taxonomy
- get_post_meta not working on publishing
- WP Query with categories only shows one post and ignores the category
- Hierarchy and access control for Custom Post Types (CPT)
- Sort posts in loop by the WooCommerce Membership of the author
- How to display custom field value on page?
- echo selected value from dropdown
- assign different templates to custom post type with homepage loop
- add post meta value
- Get custom term meta problem on single post type
- How can I see a list of products that I have set to outofstock through a custom field check box?
- CPT Repeatable Fields + Undefined Index
- Filtered by a custom field, ordered by another
- delete duplicate meta_value with same post_id
- Search CPT Title AND Meta
- CPT archive page – show one post from each taxonomy term
- How do i display post from a taxonomy term?
- Custom field only on custom post type?
- Custom loop request based on custom field
- What is the most efficient way to execute recursive complex queries?
- What is the correct way that when creating a custom post type assign values to custom fields created with pods framework?
- Display all posts from specific category and CPT
- Post Filtered by Custom Field Value
- Advanced search form with multiple custom fields
- Fetch loop of custom post types with AJAX
- Can’t pick up a field created with Advanced Custom Fields
- Pre_get_posts comparison with custom field doesn’t work
- Custom Loop Event Page
- Cant insert wrapper div into index.php
- Post content is cleared when updating
- Unable to get the upcoming events for custom post
- How can I pull information from my loop and divide them seperately?
- Fourth page of custom post type archive page does not exist
- the_content() stop images being pulled through
- ACF – Query relationship without ID
- Render a loop in Timber (twig for WordPress)
- How to show all posts of specific custom post type with their custom fields values?
- How to insert a post from a different post type after every nth post
- Sort CPT by taxonomy AND THEN by custom field
- How can I incldue a “private” post type in a loop for public users?