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
- Display a query with multiple post types and same relationship on a single page
- Add Settings to Custom Post Type
- Custom post type archive with pagination?
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Custom Post Type with static page for archive
- Custom query variable – get wordpress to redirect to nice permalink url
- Get Post Primary Category
- How to show the archive / post type description on Single templates
- How to make a field appear only if a post meta field has a defined value?
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- Control content before and after custom post type loop
- How to use a variable as a function name?
- Shortcode is displaying the content on top of the page [duplicate]
- Archive Page for Multiple Custom Post Types
- custom post type by author – wp job manager
- Let users upload image(s) to the post from front end
- How do I ensure that post_type and Taxonomy use the same slug?
- pagination for custom post type archive page
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Is it possible to get the specific content on the search page?
- Set a template on a custom post in the plugin
- Persist meta box choices throughout all posts of same post type
- Archive for custom taxonomy
- Search result based on URL
- Custom taxonomy with custom post type archive page
- Custome post type “tags” pick default archive instead of custom post type archive
- How can I generate a list of post-type specific categories?
- date archive future posts
- Custom post tag images not displaying with ACF
- Keep same archive.php for post from archive?
- posting twice from an array?
- Pagination not working on homepage
- Order custom post type is beign ignored
- Show custom category archive as front page and remove taxonomy slug from urls