Admin menu hilighting wrong item for CPT

Check: add_submenu_page( ‘edit.php?post_type=landingpage’, ‘Form Settings’, ‘Form Settings’, ‘manage_options’, // This is the menu slug, you can not pass the arguments, // if you want to pass arguments then add only one sub menu page and // links with arguments, also display content with conditions of passed arguments. ‘wp_cpt_plugin_page-form-settings’, ‘my_callback’ );

Submenu Page under Settings in Admin Panel

I didn’t test this but i’m pretty sure you just need to remove your code from the admin_menu() function declaration. Like this: add_action(‘admin_menu’, ‘register_my_custom_submenu_page’); function register_my_custom_submenu_page() { add_submenu_page( ‘tools.php’, ‘Submenu Page’, ‘My Custom Submenu Page’, ‘manage_options’, ‘my-custom-submenu-page’, ‘my_custom_submenu_page_content’ ); } function my_custom_submenu_page_content() { ?> <div class=”wrap”> <h2>Page Title</h2> </div> <?php }

Two e-commerce in two different folders of the same domain

I would like to know if you have to install wordpress also in the subfolder, so a wordpress installation for each woocommerce plug or can you manage the two online shops even with a single installation? Both options work, either 2 installations of WordPress with WooCommerce installed, or a single installation of WordPress set up … Read more

How to add styles to a submenu page?

One option is to examine the $hook and see, if it matches the parent or any of the child menu page slugs. function load_entry_scripts($hook) { $hook_parts = explode(‘_page_’, $hook); $menu_slug = array_pop($hook_parts); if ( ! in_array( $menu_slug, array(‘my-parent-page-slug’, ‘my-child-page-slug’) ) ) { return; } // add styles && scripts }