Change Admin menu placement using hooks

I’ve fixed it… Posting the solution here if it helps someone… Here is the final code that fixed my problem : /** Remove the Menu registered by Plugin **/ add_action( ‘admin_menu’, ‘my_remove_tp’, 999 ); function my_remove_tp() { remove_submenu_page( ‘themes.php’, ‘upprev/admin/index.php’ ); } /** Re-Register the menu from here **/ add_action(‘admin_menu’, ‘upprev_menu2’); function upprev_menu2(){ add_options_page(‘upPrev Menu’, … Read more

Set static page as default front page on newly created sites in multisite

Try the following code. Based on these two Q&A’s (not tested): How to add Custom Blog Options to new blog setup form? Programmatically set page_on_front add_action( ‘wpmu_new_blog’, ‘process_extra_field_on_blog_signup’, 10, 6 ); function process_extra_field_on_blog_signup( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { switch_to_blog($blog_id); $homepage = get_page_by_title( ‘Sample Page’ ); if ( $homepage ) { update_blog_option( $blog_id, … Read more