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?
- Adding post tags to custom post types
- How to list all categories and tags in a page?
- show tags of custom post type ONLY
- Pagination not working with custom category template
- Anyway to assign custom post types to a specific category?
- List with categories, subcategories and posts of custom posttype
- How to display the rest of categories on Portfolio filterable
- How can i list custom post type categories?
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- WP_Query and using a variable for ‘cat’=> in the args array = WP Bug?
- get_template_part for custom post type content not working
- Creating Accordians in WordPress Theme
- Multiple custom post type loops in category.php
- Add category in post type dynamically
- Use regular category with custom post types
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Custom post type multiple loop by taxonomy term
- How to display custom taxonomies with links in filter menu?
- 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
- What’s the WP way to load remaining custom posts?
- get_the_title() is returning results from previous loop
- How to display custom post type tags?
- Is there a reason I cannot get the current category in a loop?
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Include custom post type custom taxonomies in Categories widget
- Add more than one custom post type to wordpress home page post loop
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Loop and add Specific Categories and Products Images
- Custom post type specific category box
- Editing Loop So It Targets Specific Tags?
- How can I increase the post count for custom post types only?
- Custom post type pagination error
- Custom post type paging return home page
- Multiple Loops In Tabs Only Displaying First Loop
- How to only get the content of post page while looping?
- Staggering featured post using ‘sticky’
- Sort loop by custom field from different post type
- Show posts for current taxonomy
- WordPress loop, show only one post per custom field
- Getting list of Categories for Custom Post Types
- $post breaking container loop
- Exclude categories For Custom post types
- why get_post_meta is returning 0?
- Show search for data extracted from metabox
- Get all active posts that are tied to a custom taxonomy for a custom post type
- Best practice to display a list/archive of Custom Posts in a Page Template