Using the Query Monitor suggested by @Andrew (Thanks, Andrew!) I found a little gem in my parent theme that overrides everything set in my function.
I found out wordpress loads the child themes functions.php first
myfunction{
$query->set( 'posts_per_page', 15 );
}
so when it later loaded
lameparentfunction{
$query->set( 'posts_per_page', 5 );
}
It undid the changes I did.
Related Posts:
- get the custom post type title/name
- WordPress sitemap with Custom Post Types
- Do not show child pages within a file page
- Tell wordpress to show a single page instead of an archive page
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives by Date with Custom Permalink
- Change title in head on Archive page
- Custom Post Type Archives with 0 Posts Redirects as 404
- Page is defaulting to archive page and not designated template
- Date archives for custom post type
- Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?
- is_singular won’t call my functions?
- paginate function in archive for custom-post-type
- Custom post type archive sorted and grouped by date in post meta field
- How to create archive page for taxonomy terms within custom post type
- WordPress custom post type archive with description
- Custom-post-type-archive: posts sorted/filtered by year?
- How to list custom post types?
- Custom post type archive page pagination
- Editable content on a Custom Archive page
- Second Custom Post Type Archive
- is_main_query() not working for WP REST API
- CPT Archive with core Category
- URL of a custom post type’s post format archive?
- Create template for taxonomy results limited by Custom Post Type
- Custom post type – get_day_link()
- Custom post type archive page blank
- How to display custom post in archive section of the wordpress page?
- Set featured image to archive.php
- What’s the name of the custom post type yearly archive template?
- How can I use archive-{post_type}.php theme template?
- Return the name of the post type
- How do I add custom HTML to the content of an archive page’s posts?
- Use the custom post type archive for taxonomies?
- Archive page for custom post type and custom taxonomy
- Menu’s breaking, now showing all page links on site
- How to have multiple archive pages?
- Create a Custom Path to Archive
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- How can I increase the post count for custom post types only?
- Is possible register two archive pages for single custom post type?
- Display All Courses in Course Archive Page
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- How to add specific terms in a custom post type?
- pagination problem listing custom post types of taxonomy in wordpress
- Custom Post type page content (archive page)
- Group custom post type posts by month
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Custom Post Type archive page listing a 404 or single post
- Want to display my custom date archive to date.php but dont know how
- Rewriting archive page slug to be different than custom post type slug
- Site loads very slow for archive custom post type page
- Stop Custom post type from being searched via URL
- Custom post type category page not working
- paging is not working properly on news archives page [duplicate]
- How can I set up the URL for a category archive for a custom post type?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Stop header code from showing in category page?
- is_singular won’t call my functions?
- Pagination not working for archive
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Remove plugin’s custom post type archive page and single pages [closed]
- WordPress CPT archive page display sticky post first and then display the rest of the posts in same Query
- Remove date rewrite rule for custom post type archive page
- Different options per post type in WP_Query
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- After creating Custom post type by user delete old one
- Archive links for custom post types
- widget_posts_args not using the number of posts in widget
- Show All Custom Post Types On A Single Archive Page
- Show message when query has no posts
- Create short URL with auto 301 redirect
- ACF for custom post type archive pages: which hook to use?
- How To Post WordPress Custom Post Types to Twitter via IFTTT
- Pagination hitting 404 page on /page/4
- Get data from PHP to JavaScript to set position of each post on front page
- Undefined $post in wp_query
- Get posts from Custom Taxonomy
- How do I create a new post upon registration with the users first and last name as title
- Removing full title and breadcrumb header container for a specific post type
- Is it possible to use array_walk() to append terms to an array of posts?
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- Query entries from custom post type in an ACF flexible content field
- get_post_types() can’t get some of my post type
- Creating a non-hierarchical Taxonomy that behaves like categories
- Creating shortcode id for custom post types
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- Shortcode is displaying the content on top of the page [duplicate]
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- Filter content in shortcode
- Custom Post type date archive for custom taxonomy
- Query custom post types & Taxonomies and list them in a table on a page
- Custom Post Type setup
- Archive Page for Multiple Custom Post Types
- Custom post type and custom taxonomy 404 on page 2
- Show categories of custom post type and not all posts
- Creating a “glossary” of WordPress posts of a specific post type