Is this a sequence mismatch between the hooks?
I would argue so, yes. acf/init
gets executed by class ACF’s init
method, all in the root file acf.php – this method is hooked to WordPress’ init
with a priority of 5 like so
add_action( 'init', array($this, 'init'), 5 );
And you probably add your CPTs with a higher priority, this means acf/init
will be executed before the registering of the custom post types.
To solve this, I would hook into init
with a even higher priority (smaller than 5) to register the CPTs.
Related Posts:
- WordPress custom post type archive with description
- Validate custom fields before save using WordPress Rest API
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- CPT archive admin menu label
- Custom Post Type with Configurable Sidebar via ACF
- How to set a ‘page’ as parent of a custom post type?
- ACF Pro Accessing fields on a Custom Post Type
- Filter Content on all Post Types
- Made a Custom Post Type using ACF. Via the dashboard I cannot see the view button to see the post
- Creating a Custom Post Type
- Retrieve custom field from Contact Form 7 [closed]
- Query Custom Post Type Taxonomy term with multiple parameters
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Custom Post Type slug same as page name
- How to query WordPress posts bycustom field with a max characters’ length
- How to display custom post in archive section of the wordpress page?
- Content Editable CPT Archive?
- list archives per post types
- The loop seems stuck to a single (now deleted) post
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Canonical url differs from custom post type archive URLs
- Display a custom posts page for post type
- Custom post type archive pagination 404
- How to update post meta on uploaded image from a custom form?
- posttype/taxonomy/term archive page 404 error
- How to group posts and get a mixed posts and groups view?
- Is it possible to have a custom post type with feed but without the archive?
- Filter Posts from the Main Query
- Custom Post Types vs. Advanced Custom Fields (with Repeater Field add-on)
- Multiple Frontend Filters Using Advanced Custom Fields
- Integrate Custom Post Type Events into Calendar
- Specific routing for CPT
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Order post by date with ACF
- Displaying custom field according to date
- How to set the seo title tag on a page by page basis?
- WebP Fallback for Inline Background Image in Style Attribute
- Paginate_links in custom post type template
- Adavnced custom fields relationship query plus query inside
- Query based on custom fields start and end date
- My archive-posttype.php template is not loading
- How To Import CPT With Only Few TEXT ACF Fields From Front End?
- Custom Post Archive is not working
- Categorise Custom Post Types
- Advanced custom field boolean value in custom post type
- How can I add a filter to a particular post format?
- Is there any way to get list of all possible filter hooks for all post types?
- Limit the Title Length on Custom Post Type Archive Page to a Set Number of Characters
- Custom post type archive with page as parent url
- Add parent post to Custom Post Type [closed]
- Why is my WP Query not returning first result’s post meta?
- Set featured image to archive.php
- Add a custom text to admin footer in a Custom Post Type page
- How to add/edit advanced custom fields on custom post type’s WordPress REST API?
- What’s the name of the custom post type yearly archive template?
- Get rid of “trash can” for custom post type
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- Querying & displaying custom post type into an existent page [closed]
- Custom post type, global categories — what’s the template name?
- How to get a custom type post data when it has a connection with another custom type post?
- How to hyperlink content from archive page with custom post-type
- Custom post type showing same Post on all Pages
- Why would social icon badges disappear after adding a custom post type?
- Sort a custom post with ACF: Date Picker & Display Featured!
- Set thumbnail and title for a post type archive (not post itself!)
- Use remove_meta_box conditionally on custom post type
- How to set up Custom Post Type archive page as Front page
- Url to archive page for custom post type
- ACF repeater field usage
- How can I use archive-{post_type}.php theme template?
- How to display CPT archives?
- Custom meta Title for custom post type archive from page
- Custom Meta fields Update hook?
- Excluding a Custom Post Type with a specific tag using pre_get_posts
- List of users that clicked a ‘Join’ button at single post
- wp_trash_post action hook with custom post type
- Return the name of the post type
- How do I amend form data before it is saved for a custom post type
- Add an Outside Wrapper to my Header and Make it Full Width
- Post loop count is not in order
- current-menu-item not added on page showing custom post type (rendered with archive template)
- Alphabetically sort a taxonomy.php template by post title
- How to inherit field value from parent post into in child / sub post
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- sortable columns for multiple custom post types not working
- Custom Post Type page sorts differently on different environments
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- How check if a post is saved from backend or frontend?
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- 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?
- Permalink problems with custom post type and custom taxonomy
- Custome fields not displayed
- sort CPT on Custom Taxonomy Archive page
- How to build a WordPress post review system beside commenting
- WordPress hook after post content and meta update
- Create short URL with auto 301 redirect
- Use the custom post type archive for taxonomies?
- How to define the template for custom posts?
- WordPress hook which triggers on post import