From 160c1adbd97d1302d297455e6a616cd024cd4ec8 Mon Sep 17 00:00:00 2001 From: Brad Williams Date: Wed, 19 Aug 2020 14:17:05 -0400 Subject: [PATCH] Add setting page as submenu to movie CPT --- ps-rest-api.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ps-rest-api.php b/ps-rest-api.php index ed48e47..e173730 100644 --- a/ps-rest-api.php +++ b/ps-rest-api.php @@ -34,8 +34,10 @@ function ps_register_custom_post_type() { function ps_create_menu() { // Create custom top-level menu - add_menu_page( 'Movies Page', 'Movies', 'manage_options', 'ps-movies', 'ps_movie_api_results', 'dashicons-smiley', 99 ); - + //add_menu_page( 'Movies Page', 'Movies', 'manage_options', 'ps-movies', 'ps_movie_api_results', 'dashicons-smiley', 99 ); + + add_submenu_page( 'edit.php?post_type=movie', 'Movie Importer Page', 'Import Movies', 'manage_options', 'ps-movies', 'ps_movie_api_results' ); + } // Request and display Movie API data