acf-options-for-polylang
acf-options-for-polylang copied to clipboard
Exclude ACF sub_page
Version information
- Plugin version : 1.1.10
- PHP : 8
- WordPress : 6.2
- ACF version :
- Polylang version :
Hi guys, I'm trying to exclude a sub options page. ACF function:
acf_add_options_sub_page([
"page_title" => __("Timer", "timer"),
"menu_title" => __("Timer", "timer"),
"menu_slug" => "timer",
"post_id" => "timer",
"redirect" => false,
"position" => "6",
"parent_slug" => "options",
"icon_url" => "dashicons-list-view",
"update_button" => __("Save", "timer"),
]);
How can I exclude this one from the plugin? I'm trying the filter like this:
add_filter('bea.aofp.excluded_post_ids', function ($ids) {
$ids[] = 'timer';
return $ids;
}, 10, 1);
But that doesn't seem to work. Any idea what I'm doing wrong? Thanks in advance!
@Loosie94 I think you can use the beabea.aofp.get_default-hook to see what post_id the field belongs to.
Just var_dump the the $post_id and you should se it above each value fetched from the option pages.
# functions.php
add_filter('bea.aofp.get_default', function ($show_default, $post_id) {
var_dump($post_id);
return $show_default;
}, 10, 2);