I’m experiencing the following issue with ACF 5.9.1 and WordPress 5.5.1. When I select a Page Link or a Post Object as the field type and don’t select anything at ‘Filter by Post Type’, I still don’t see all post types when I edit this field in the post where it is shown. I have 12 post types in total and it doesn’t show the last 2.
When I just filter these last 2 post types for the field, it does show me the posts for those 2 post types when editing the post. However, when I add 1 other post type to the filter, it just shows posts from that 1 added filter when I edit the field on a post.
It seems like a bug. I haven’t come across it before, but I also don’t think I ever made a site with more than 10 post types.
Hope you can help,
I’m experiencing the same issue.
If you only choose 2 post types and one of them is the last two that don’t show and one of them is a post type that does show when none are selected, what happens?
Hi John. If I select 1 post type of the ones is does show by default and 1 of the ones it doesn’t show by default, it then only shows posts from the post type it shows by default.
I would start by looking at the options for the ones that do not show up compared to the ones that do.
I’ve seen this come up before, but I don’t remember what the cause was. It either had something to do with the post type settings or it was a permission issue.
I might also try adding this somewhere to see if these missing post types appear
echo '<pre>'; print_r(get_post_types()); echo '</pre>';
Hey, the function outputs this:
[post] => post
[page] => page
[attachment] => attachment
[revision] => revision
[nav_menu_item] => nav_menu_item
[custom_css] => custom_css
[customize_changeset] => customize_changeset
[oembed_cache] => oembed_cache
[user_request] => user_request
[wp_block] => wp_block
[polylang_mo] => polylang_mo
[acf-field-group] => acf-field-group
[acf-field] => acf-field
[projects] => projects
[flatfiles] => flatfiles
[clients] => clients
[quotes] => quotes
[presentations] => presentations
[modules] => modules
[work] => work
[typefaces] => typefaces
Work and typefaces are the ones that don’t show up in the page link select field when I add 1 other post type.
I looked at all the settings for those two post types and they’re exactly the same as for the other post types. Also I changed the name of the field from Post to Post Link, because I thought maybe that interfered, but the issue remains.
Hope you might have another hunch!
For me this was caused by certain post types not being activated in the multi-language plugin (Polylang). When I activated them there, it was fixed.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Websites need a central admin area to control global settings, and that's exactly what our Options Pages do!— Advanced Custom Fields (@wp_acf) May 31, 2021
Just drop a few lines of code in your functions.php file and - hey presto! 🎩🎉 Now you can add fields to a custom admin page!
❤️ 2 of 10 pic.twitter.com/whraFBPtXq
© 2021 Advanced Custom Fields. Subscribe