Home Forums Feature Requests Options page: post_id for acf_add_options_sub_page


Options page: post_id for acf_add_options_sub_page

  • post_id is a great improvement. I was looking for such feature for a long time.

    It would be great it there was a possibility to set an ID for sub pages as well.

    Why? Because top level pages are usually used to group sub pages (for axample top level page is called Theme Options, and all other pages are sub page of this page). So in this case post_id feature becames useless, because all the sub pages shares the same ID.

  • Not sure I understand what you mean. Options pages don’t have a post id because they aren’t posts, they are just admin pages and the fields are stored in the WordPress options table.

  • You’re wrong. Take a look at docs. post_id parameter is set to ‘options’ by default. Possibility to set post_id was introduced in v5.2.7.

  • okay, I miss things once in a while, especially when I don’t have a reason to use them. and I missed it when I added the autoload feature to my own plugin. Never even noticed it.

    Have you tried including a post_id when creating a sub page? Sometimes things are possible that are not documented. I’ll have to check this out. In the mean time I’ll mark this thread for the developer to take a look at when he has time.

  • To answer the question, yes, you can supply the post_id setting to options sub pages as well and the values entered on the options page will be saved and pulled from the post.

  • If you are interested I added this feature to my options page adder plugin.

  • It’s a shame but I didn’t even try to set post_id for sub page. I assumed that it’s not posssible because it’s not documented 🙂


  • There is quite a bit that’s not documented. I knew for example that the two function add_options_page and add_options_sub_page actually both end up calling the same function in the end because I dig around in the code a bit, and I needed to understand how these work to build my plugin.

    What bothers me, like I said, is that I completely missed this option when I was adding the autoload option.

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

The topic ‘Options page: post_id for acf_add_options_sub_page’ is closed to new replies.