PHP code example of iceicetimmy / acf-post-type-selector
1. Go to this page and download the library: Download iceicetimmy/acf-post-type-selector library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
iceicetimmy / acf-post-type-selector example snippets
add_filter( 'post_type_selector_post_types', function( $post_types, $field ) {
$post_types['foo'] = get_post_type_object( 'foo' );
unset( $post_types['post'] );
return $post_types;
}, 10, 2 );