Cannot access my first sub-site in a multisite [closed]
[resolved] fixed issue by removing site and associated user a re-creating
[resolved] fixed issue by removing site and associated user a re-creating
Prior to 4.5 vanilla WordPress (without any extras) could get you close but not all the way. As of WordPress 4.5, they no longer require a plugin to map domains. There is a plugin that can allow separate domains to be used in a single multi-site setup but I do not recall what it is … Read more
Got a solution at – https://isabelcastillo.com/remove-blog-slug-multisite In the root site of my directory base multisite, I went to Settings -> Permalinks. Then I change my permalink. Then go the Network Admin -> Sites -> and clicked on Edit Then switched to Settings tab -> Now remove the blog text from Permalink Structure and saved. This … Read more
With wpmu_create_blog() function, we can create subsites easily. Add the following code in your form submit wpmu_create_blog ( ‘your_domain’, ‘/subsite_path’, ‘Title of Subsite’, ‘1’ ); NB: if your site url is https://www.example.com then your_domain is should be example.com Ref: https://www.krishaweb.com/how-to-programmatically-create-new-site-in-wordpress-multisite-within-60-minutes/
try this $sites = get_sites(); global $switched; /** @var WP_Site $site */ foreach ($sites as $site) { if ( $site->archived || $site->spam || $site->deleted ) { continue; } switch_to_blog( $site->blog_id ); $all_posts = get_posts(‘category=-3&numberposts=6&orderby=post_name&order=DSC’); ?> <ul> <?php foreach($all_posts as $post) : setup_postdata($post);?> <li> <a href=”https://wordpress.stackexchange.com/questions/354427/<?php echo get_page_link($post->ID); ?>” title=”<?php echo $post->post_title; ?>”><?php echo $post->post_title; ?></a> … Read more
As discussed in the comments the fix is to put your wpmu_activate_user hook into a must-use plugin under /wp-content/mu-plugins/. The problem is that the email’s activation link handler, wp-activate.php, defines define( ‘WP_INSTALLING’, true ); (I guess to cover the case it’s running in the context of a newly provisioned site?) and wp-load will not load … Read more
Welcome! Because you are using multisite, there are a few other places your site may have the WWW active. I would look in the following: wp-config.php under “DOMAIN_CURRENT_SITE”. info wp-config.php under “WP_HOME” and/or “WP_SITEURL” info Inside the database under the “{prefix}_site” (wp_site) table info Inside the database under the “{prefix}_blogs” (wp_blogs) table info Failing those … Read more
Per the filter’s documentation, the $content should be formatted for use by wp_mail(). In the wp_mail() documentation, I find this: The default charset is based on the charset used on the blog. The charset can be set using the wp_mail_charset filter. So it appears you need to explicitly allow WordPress to send HTML mail. See … Read more
BP on multisite can be quite complicated. If you network-activated BP, then afaik the users will be available on all ‘blogs’. There are several ways to config a BP > multisite install. There are a couple of plugins that may help, for example: https://buddydev.com/plugins/buddypress-multi-network/ More info from the BP codex: https://codex.buddypress.org/getting-started/installation-in-wordpress-multisite/
I finely made it work this way: // Sending custom field data to $meta add_filter(‘add_signup_meta’, ‘sb_add_signup_meta’); function sb_add_signup_meta($meta) { if( isset( $_POST[‘phone_number’] ) ) { $phone_number = filter_var( $_POST[‘phone_number’], FILTER_SANITIZE_NUMBER_INT ); $meta[‘phone_number’] = $phone_number; return $meta; } else return $meta; } // Updating user meta on user activation. Works only if user chose registration without … Read more