Stand down! I got it with ‘pre_get_posts’:
add_action( 'pre_get_posts', 'pre_service_archive' );
function pre_service_archive() {
if( is_post_type_archive( 'service' ) ) remove_theme_support( 'infinite-scroll' );
}
Related Posts:
- Jetpack infinite scroll render – make different depending on post type?
- Jetpack Infinite Scroll won’t fire [closed]
- Custom post metadata not appearing in public API
- Redirect to another page using contact form 7? [closed]
- Remove “show sharing buttons” metabox Jetpack from custom post type
- Register CPT if Jetpack Portfolio is not active and only once
- Infinite scroll doesnt work
- How to change base in tag URL for custom post type, to not use “Custom Structure” set in Permalinks setting?
- How to integrate single and archive templates for custom post type in any WordPress theme
- set_query_params using custom params defined in functions file?
- Custom shortcode works in Elementor editor but not on frontend
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”
- How to see posts in taxonomy endpoint
- Graphql: Unable to query (where:{author}) for custom post type
- Combine multiple CPT names to create valid permalinks
- Permalink problems with custom post type and custom taxonomy
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Select other roles as custom post authors
- Pagination not working on custom query on a page
- Why does wp_update_post causes white screen?
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- How to properly delete custom post type posts programmatically
- Loop through posts of only 2 statuses
- Get terms of a post but only if they’re also the child of a specific term
- Targeting custom post type via functions.php doesn’t work
- Query within a foreach within a query (queryception)
- How to implement a different permalink structure for custom post type?
- WP API Response does not show my registered metadata
- How to create a one to many relationship in two different custom post types
- Custome fields not displayed
- sort CPT on Custom Taxonomy Archive page
- WordPress Custom Post Type – Rewrite Query
- Unable to display selected post title in frontend from metabox wp_dropdown_pages()
- Get Posts by Category, Tag , and CPT Taxonomy
- How to detect that the save_post hook is calling the callback associated to the current edit post page only
- Custom Post Type – Rewite Archive page
- Custom Post Type – Support “author” only for admins
- register_post_type()’s rewrite slug not working
- Cannot get custom post
- find custom post type post by searching its custom field with my string
- How to access the thank you page from the single post?
- Proceed to the next video of the custom post type but remain on the same post
- WordPress different templates for same type custom post (but different slug)
- wordpress lists similar type of posts in a custom post type
- How do I add custom HTML to the content of an archive page’s posts?
- Conditional tag only for front of custom post type
- FacetWP paging custom wp_query
- why post_class() function apply css classes to all other files?
- Update post if exist from PHP
- Remove taxonomies using register_post_type_args
- Looping Through Categories of a CPT
- Different options per post type in WP_Query
- How to create connection among state, city, store and store number based on URL
- How to add a sub directory to WordPress single posts without affecting other post types?
- Custom post type and standard post not displaying or working
- Change custom taxonomy archive permalink
- What is the diference between Post Metadata and Queried Object
- post_type internal ID?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- REST filters only firing when I have a param set
- Is it possible to have “two” sets of tags?
- How do you make a list and list item relation if custom post types?
- How to enable UX builder for custom post types in Flatsome
- search custom post type by custom fields on front end
- Show Taxonomies with admin area for custom post type?
- Custom post type Shortcodes wordpress
- category list with cutom post count
- Empty search input does not return all posts
- How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2
- After creating Custom post type by user delete old one
- WordPress admin display post type tags as checkbox
- I want to know if i can add two different custom post types to my wordpress site
- SEO Concerns With Rewrite Rules
- Empty taxonomy items for CPT in admin grid
- $post->post_meta not pulling any post in wordpress/php
- How to show my post type TEAM in dynamic way?
- Set parent for custom post type archive rewrite url
- WordPress custom API endpoint – how to make the request more flexible
- Values from meta-box not on $_POST
- How to rewrite the beginning and end of the permalink structure in a custom post type?
- Add to ‘action’ within post.php to allow more actions when editing a Custom Post Type in a plugin
- How to get_term_meta on single custom post?
- custom endpoints on Custom Post Type return 404 page not found
- Search Filter CPT, Custom Loop
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- ArgumentCountError caused by wp-includes/class-wp-hook.php
- ajax response not recieving
- Reordering admin columns for CPT with custom taxonomy and an added custom field
- Getting post attchment URL to populate a CPT Admin Page Column
- The Difference Between Categories and Tags and Taxonomies and Terms
- How to build a WordPress post review system beside commenting
- Pagination doesnt work in custom post type
- Route subpage to Custom Post Type
- Custom REST endpoint not working to retrieve single posts (“rest_no_route”)
- Archive links for custom post types
- singular_name label in custom post type
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Many to many to many custom post relationships
- how to create custom post type with dynamic category_name using shortcode