Skip to content

Instantly share code, notes, and snippets.

@schemapress
Last active October 16, 2019 23:48
Show Gist options
  • Save schemapress/2d8d08c587066f8e2f279e94ff415672 to your computer and use it in GitHub Desktop.
Save schemapress/2d8d08c587066f8e2f279e94ff415672 to your computer and use it in GitHub Desktop.
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