Support

Account

Home Forums Backend Issues (wp-admin) Is it possible to add a child to the menu created by ACF with an address for edi

Solving

Is it possible to add a child to the menu created by ACF with an address for edi

  • I create options for my sidebar, but I would like custom posts to appear in these options as a child. Is it possible? I would like the custom post not to appear directly in the side menu, but only in the menu created by me in ACF

    add_action( ‘acf/init’, ‘my_acf_op_init’ );
    function my_acf_op_init() {

    // Check function exists.
    if ( function_exists( ‘acf_add_options_page’ ) ) {

    acf_add_options_page( array(
    ‘page_title’ => ‘Sidebar’,
    ‘menu_title’ => ‘Sidebar’,
    ‘menu_slug’ => ‘sidebar-settings’,
    ‘capability’ => ‘edit_posts’,
    ‘redirect’ => true,
    ‘icon_url’ => ‘dashicons-table-col-before’,
    ‘position’ => 9
    ) );

    acf_add_options_sub_page( array(
    ‘page_title’ => ‘Reklamy’,
    ‘menu_title’ => ‘Reklama’,
    ‘parent_slug’ => ‘sidebar-settings’,
    ) );

    acf_add_options_sub_page( array(
    ‘page_title’ => ‘Patronaty’,
    ‘menu_title’ => ‘Patronaty’,
    ‘parent_slug’ => ‘sidebar-settings’,
    ) );

    /* HERE I WANT TO CREATE SUBMENU WITH CUSTOM POST TYPE reviews and remove it directly from the admin menu*/
    acf_add_options_sub_page( array(
    ‘page_title’ => ‘Reviews’,
    ‘menu_title’ => ‘Reviews’,
    ‘parent_slug’ => ‘sidebar-settings’,
    ‘menu-slug’=> ‘edit.php?post_type=reviews’
    ) );
    }
    }

  • You will need to supply more information about what you are trying to do.

  • I have a group of SIDEBAR HOME options, my own fields “advertisement” and “patronage” are registered there. I would like to add to this menu as another element of custom posts

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

You must be logged in to reply to this topic.