Support

Account

Home › Forums › Bug Reports › Not showing certain post types in Post Object and Page Link fields

Solved

Not showing certain post types in Post Object and Page Link fields

  • Hi,

    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,
    Tom

  • 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:
    Array
    (
    [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!

  • My suggestion is to contact the developer, this appears to be a more complex problem than can be solved here. https://www.advancedcustomfields.com/contact/

  • 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.

  • In addition to activating the post types in Polylang, I had to define a language to all the existing posts for them to show up.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.