Create form which redirects to site in network?

You could perform a validation through get_blog_id_from_url($domain, $path) function, assuming you are using directories and NOT subdomains. Otherwise, $path is not required. See code and comments below. <?php if ( ! empty( $_POST[‘sitename’] ) ) { $main_site_url = network_site_url( “https://wordpress.stackexchange.com/” ); $domain = preg_replace( “/^https?:\/\/(www)?/”, ”, $main_site_url ); $path = preg_replace( “/\//”, ”, trim( $_POST[‘sitename’] … Read more

Add a menu item to admin dashboard which isn’t a link? [duplicate]

You may want to look at adding admin style and then targeting the menu: function admin_style() { wp_enqueue_style(‘admin-styles’, get_template_directory_uri().’/admin.css’); } add_action(‘admin_enqueue_scripts’, ‘admin_style’); This is just an example: #menu-comments:before { border-top: 1px solid red; content: “”; display: block; margin-top: 10px; margin-bottom: 10px; width: 100%; } This adds a red divider above the “comments” menu, but adjust … Read more