Home Forums Add-ons Options Page Get option values from specific options page? Reply To: Get option values from specific options page?

  • Just want to reiterate, that I’m not the developer and don’t make the decisions, so these are just thoughts of someone that’s spent a lot of time digging around in ACF and figuring out how it works.

    There aren’t many choices in WP to store values. You have posts, post_meta, terms, term_meta, users and user_meta, comments, comment_meta and options.

    There is the possibility of having ACF store values for particular options pages to a “Post ID”. In other words, when you set up the options page you tell it what post id to use and it will save the values there. This would allow for multiple options pages to use the same field groups without needing to modify field names.

    From other comments and requests I think that it is commonly believed that ACF knows what custom field value belongs to a post or and options page. Really, it does not. It only knows what values belong to what fields and it loads the values associated with either the current post that’s being displayed or the post ID that is supplied when using the $post_id parameter in one of it’s functions. Without this 3rd bit of information that must either be assumed or supplied, ACF would be unable to find any data.

    By the way, in my options page adder add on for ACF, one of the options lets you select saving values for an options page to a post. You can even select the options page post that you’re creating as the place to save your values to after you publish the options page, it is really the perfect place to save them since it’s not being used for anything and is already holding the information the options pages. You just need to be careful that you don’t use one of the field names that is used in the group for creating the options page, which should be pretty easy since they all start with “_acfop_”…