Bootstrap Theme Migrated to WordPress
Bootstrap Theme Migrated to WordPress
Bootstrap Theme Migrated to WordPress
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 remove empty menu space when creating admin page without menu title using add_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 }
How to create a custom post-new.php page for plugin , no wp menu
Because the main menu has manage_options but the sub menu has manage-options, it should be _ not -. Since nobody has the manage-options capability nobody can see that submenu page.
Renaming submenu “parent slug” option to null is the solution to this. add_submenu_page( null, null, null, “manage_options”, “edit-testimonial”, “edit_testimonial” );
How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
I found how it could be done! Instead of using that function it was possible to add a query and another function. This is the code goes in the page.php file. <?php $subs = new WP_Query( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ‘meta_key’ => ‘_thumbnail_id’ )); if( $subs->have_posts() ) : while( $subs->have_posts() ) : … Read more
Try it: function sunshine_submenu_show_fix($parent_file) { global $plugin_page; $taxonomy = $current_screen->taxonomy; if ($taxonomy == ‘sunshine-product-category’) $plugin_page=”sunshine_admin”; return $parent_file; } add_action(‘parent_file’, ‘sunshine_submenu_show_fix’); explanation: in file /wp-admin/menu-header.php: $parent_file = apply_filters( ‘parent_file’, $parent_file ); get_admin_page_parent(); … function _wp_menu_output(…) { … if ( ( $parent_file && $item[2] == $parent_file ) || ( empty($typenow) && $self == $item[2] ) ) { … Read more