The problem is query_posts()
. It is stomping on the default query, and killing your pagination. Don’t use query_posts()
. Filter $wp_query
at pre_get_posts
instead:
function wpse123674_pre_get_posts( $query ) {
// Only modify the main query on the tag archive index
if ( $query->is_main_query && $query->is_tag() ) {
$query->set( 'post_type', array('post, cool_tools, tribe_events') );
}
}
add_action( 'pre_get_posts', 'wpse123674_pre_get_posts' );
This belongs in functions.php
. In your template file, simply remove all references to any query modification.
Related Posts:
- Load custom posts with same tag as page
- how do I group content in magazine-style ‘issues’?
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- How to show related posts by category or custom post type?
- Categories and Tags not working!
- Query Custom Post by Category
- Search doesn’t find tags or categories in custom post types
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- get_template_part() – post-meta not working?
- get_template_part for each level of taxonomy term
- get_template_part and template file names
- Group posts by custom post type
- Custom post type getting wrong categories and tags
- Show a Category X’s custom post type on Category X archive page?
- Custom Tag Description unable to display just below and outside of the Loop
- Custom post type, organized by categories
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- WP Query with categories only shows one post and ignores the category
- Cross reference custom post types
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Meta data (Tags and Categories) for Custom Posts not showing.
- Why does my taxonomy have a category style div id?
- Need help deciding on a taxonomy
- Get Posts by Category, Tag , and CPT Taxonomy
- The Difference Between Categories and Tags and Taxonomies and Terms
- get_terms() parent, child and grandchild
- Use post in multiple places on a page with multiple posts
- Custom post type, taxonomy and admin bar
- CPT archive page – show one post from each taxonomy term
- Advanced archive url structure (category, tag and date)
- Show the categories the current post has
- On click some element i want to use some template
- get taxonomies from terms
- How to set “section categories”?
- Custom WordPress theme not displaying posts from category
- Pagination for a cpt filtered with a category
- Excluding category from loop not working
- Custom post types not displaying per category
- Only show current category post
- Do not output category and tag URLs
- Custom Post Type + Category archive
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Loop multiple taxonomy in custom post
- How to query all custom posts of a certain type and checking what category they have
- Custom Post Type – Admin Columns
- WordPress Custom Post Type and sort by Tags
- Categories and page filtering with pre_get_posts
- Query Custom Post Type by Tag
- Display by tag from different post types
- display all posts in current category
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- CPT + CMB2: data not displaying for only first post in loop
- Posts from all the categories are being displayed instead of particular category
- Get next and previous 3 posts in a term in single post page
- Get parent categories of custom post type
- Custom post types and tag archive pages/permalink structure issue
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- How to query_post custom posts within default taxonomy?
- Conditional Statement custom post type category
- Show custom post type filtered by category
- Custom Post Type With Categories
- Loop custom taxonomy to get lists of cutom post types?
- Display posts from Custom Post Type in category page on front-end
- How do i calculate the total of values of custom fields in custom post types?
- Multiple Loops On Custom Post Type Template?
- 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
- Custom loop with multiple taxonomy queries
- I would like to have different styles for my posts based on the content of each post
- Separate custom categories from default category
- search also in taxonomy, tags and custom fields
- Checking if Post Title is Unique as Loop Criteria
- Custom post type not displaying content from single-{custom post type} page
- forming WP_Query for posts of all post types but from specific categories
- wp_list_categories() – current-cat class also inside posts?
- Showing posts from different categories and from custom post type
- Custom post type multiple loop by taxonomy term
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Listing tags from a custom post type
- List custom taxonomy specific to one custom post type
- Paging doesn’t work?
- Sort by alphabetical order archive.php page
- wp_update_term_count_now doesn’t work with a custom post type?
- Add tag to a custom post type doesn’t change the total of custom post type in backend
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- PHP variable not regenerating when publishing multiple posts at the same time
- Display all taxonomy terms, add class if term applies to current post
- Multiple level category drop-down from the WordPress dashboard
- Return the latest post from a custom Taxonomy and Post Type
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Add custom post type settings to wordress default posts
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Hide parent categories when clicked, and show it’s childs
- Limit amount of posts made within a custom taxonomy