add_image_size
is intended to be defined globally (outside of the context of a post type). This is because when images are generated they are not yet attached to a specific post type.
If you’re using a plugin or WP CLI to regenerate the thumbnails, you are outside of the context of a post type. Therefore those checks are always going to fail.
You should simply do
add_image_size('75x75',75,75, true);
add_image_size('150x150',150,150, true);
add_image_size('200x200',200,200, true);
add_image_size('400x400',400,400, true);
In your functions.php
, class file, plugin, etc.
Related Posts:
- Style custom columns in admin panels (especially to adjust column cell widths)
- Counting the number of posts (custom post type) Query problems
- Why are comments and trackbacks still getting through for custom post types?
- Display a query with multiple post types and same relationship on a single page
- How to check if a WP_Query has data
- Why won’t my metabox data save?
- Defining capabilities for custom post type
- Templates for Custom Post Types and Custom Taxonomies
- Add metabox with media uploader in a custom post type [duplicate]
- How to set a custom post type post as static front page?
- Add links to post categories and taxonomies in wysiwyg link modal?
- Retrieving 3 latest post from each of 5 different custom post types
- How to save contact form 7 data in Custom Post Types (CPT) [closed]
- How to solve suspected memory issue in custom WordPress loop?
- Wp-query causing problems with the_content();
- Custom Taxonomy Breadcrumb Navigation
- Remove “-2” from a Toolset Types URL with the same post name
- Problems excluding a custom post-type from the loop
- Get permalink and title by post name?
- Ordering Custom Post Types with WP_Query
- get custom post type categories
- Custom query variable – get wordpress to redirect to nice permalink url
- Custom Post Type and Taxonomy combination
- How to create an array for a CPT post ID to use in an IF/WHILE statement
- How to filter search results by post type?
- Can’t unregister parent theme’s CPT from my child theme
- Unable to show meta box data in frontend
- Get Post Primary Category
- How to check the terms in single custom post type template
- Custom Post type with ACF in REST API, how do I get those values?
- Loop through Custom Post Type, and then show children within each iteration
- How to only show posts assigned to current user, only in certain post types
- How to make a field appear only if a post meta field has a defined value?
- current_user_can() return FALSE but debugging says TRUE
- How to save custom taxonomy from front end post submission
- wp_list_categories() – current-cat class also inside posts?
- Showing the custom taxonomy parent term and child term of a post
- How to set a CPT to have a page as a parent, then rewrite urls accordingly?
- Post injections into Site Origins Page builder [closed]
- Change custom post type permalink to show name of post from another custom post type?
- How to use Custom Page Templates for hierarchical Custom Post Type
- Multiple templates for single custom post type
- Displaying and searching Custom Posts
- It’s possible to hide body copy box for a custom post type?
- Categorise Custom Post Types
- List of child custom post types lists all custom post types
- get post types and plugin order
- page template for custom post type
- Trouble with pagination
- How to do admin CRUD & Pagination
- User-submitted reviews of different custom post types
- Template Hierarchy for custom post type pages
- Custom Post Type not showing in main loop
- posts within custom post type all share the same content in the front-end
- custom post type by author – wp job manager
- How to query Posts from a custom post type which contains a custom taxonomy?
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Change Custom Post Type singular_name through function/filter
- Multiple custom post types on index page with custom templates
- How set template for “custom post type” individual post
- How do I ensure that post_type and Taxonomy use the same slug?
- 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?
- Custom Form / Search with Custom Post Type Data
- How add Filter by Tags and by categories to custom post type in Gutenberg block
- Does non-content posts have a negative impact on SEO?
- Custom Column in CPT admin table not updated after Quick Edit save
- How can I display a specific category on Front-Page
- Update user_meta field from post_meta custom field
- Set a template on a custom post in the plugin
- Some posts not displaying by taxonomy term
- Update post status from “publish” to “trash” prior to year 2018
- How to seperate posts by categories?
- I want to create pagination for my custom post type archive that i am displaying with loop
- Search in multiple specific post types
- Showing taxonomies with terms that are attached to custom post
- Custom Post Type is not respecting assigned categories
- Saving Child Terms on front end not setting parent
- What is WordPress’ custom post type ‘Logs’?
- How to set a default CPT template and create post attribute´s display rules?
- Custom post url in search.php isn’t the correct rewrited url
- Getting Custom post category from Form
- date archive future posts
- Trying to get custom post type attachment images to function in indexed array
- Converting a checkbox filter for custom fields to a dropdown
- How can i call a custom method on submission of a custom plugin post type?
- Category slug not showing for Custom Post Type
- Custom post type page for authors
- Select custom post by meta value
- Custom template support for custom post type?
- Using one custom taxonomy.php for two custom taxonomies?
- posting twice from an array?
- Custom post type – permalink
- Custom post type with custom taxonomy
- custom post-type query just returns two posts
- Custom Post Type Template Based on Page Slug?
- Passing postid of Testimonial Custom Post in Shortcode Parameter
- How to get ‘Products’ on home page?
- body class according to number of published custom posts
- How do I target a links only in a custom post type and only in the p tag?
- Taxonomy Archive URL + Template