Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Schema Premium: Add post type to Locations post type select choices https://schema.press/docs-premium/add-locations-post-type-select-choices/
<?php //* do not include php tag
add_filter( 'schema_acf_field_post_type_select_choices', 'schema_acf_field_post_type_select_choices_add_product_45263542' );
/**
* Schema Premium Plugin: Add missing post type "product" to Locations post type select choices
*
* @since 1.0.0
*/
function schema_acf_field_post_type_select_choices_add_product_45263542( $post_types ) {
$post_types[] = array(
'value' => 'product',
'label' => 'Products'
);
return $post_types;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.