How to map a specific multi-site blog to a folder?
in the domain/ .htaccess file, add this line at the beginning. RewriteEngine On RewriteBase / RewriteRule ^mag/([_0-9a-zA-Z-]+/)?$ /sites/mag/$2 [L]
in the domain/ .htaccess file, add this line at the beginning. RewriteEngine On RewriteBase / RewriteRule ^mag/([_0-9a-zA-Z-]+/)?$ /sites/mag/$2 [L]
Check that your category.php file has no errors first. Go to Settings -> Permalinks and save it again to rebuild your permalink structure just in case.
Maybe the hook init is to late for the class and method go(), the update functions run earlier? The hooks muplugins_loaded and update_option start before the init. I have not test your code, is only a hint, not a solution. Maybe also helpfull a analyse of the hook order in the screenshot, create via plugin.
WordPress multisite’s “Upload Path” should be set to a server-relative path (e.g. /home/serveraccountname/public_html/wp-content/uploads). The “Upload URL Path” should be the URI (e.g. http://example.com/wp-content/uploads). Ignore the /sites/1/ fragment for sub-sites – WordPress will add these automatically.
Thanks to @Sorin for posting the trac. From there I found a solution using just filters in functions.php (so no editing the core) Thanks @mensmaximus for posting there: Link: https://core.trac.wordpress.org/ticket/33887#comment:3 <?php add_filter( ‘network_admin_url’, ‘mmx_network_admin_url’, 1, 2 ); function mmx_network_admin_url( $url, $path ){ $url = “https://my_master_domain/wp-admin/network/” . $path; return $url; } add_filter( ‘admin_url’, ‘mmx_admin_url’, 1, 3 … Read more
If you look at the source code of the ‘Add New Site’ page, you can see that WordPress does not provide a hook for this purpose. Of course, it would be possible to add a hook yourself, but it is generally bad practice to edit the WordPress core. However, once submitted and all information is … Read more
Found the answer, posting the code below so it may help future generations. <?php global $wpdb; $count_terms = $wpdb->get_var (“SELECT COUNT(*) FROM wp_2_term_taxonomy, wp_2_posts, wp_2_term_relationships WHERE wp_2_posts.ID = wp_2_term_relationships.object_id AND wp_2_term_relationships.term_taxonomy_id = wp_2_term_taxonomy.term_taxonomy_id AND wp_2_term_taxonomy.term_id = ’22’ AND wp_2_posts.post_type=”post” AND wp_2_posts.post_status=”publish” “); $count_terms1 = $wpdb->get_var (“SELECT COUNT(*) FROM wp_3_term_taxonomy, wp_3_posts, wp_3_term_relationships WHERE wp_3_posts.ID = wp_3_term_relationships.object_id … Read more
A simple solution is: wp user reset-password $(wp user list –field=user_login) got that from forcing all plugins update after a minor takeover: wp plugin install $(wp plugin list –field=name) –force
More than an answer, a study on the matter. The Excel issue we need an array, and Excel can provide a CSV a couple of solutions: How to extract data from csv file in php? not implemented here Relevant Q&A What’s common to all is: no definitive procedure has been recorded in this Stack. Programmatically … Read more
You should first read (emphasis mine): The sites in a multisite network are separate, very like the separate blogs at WordPress.com. They are not interconnected like things in other kinds of networks (even though plugins can create various kinds of interconnections between the sites). If you plan on creating sites that are strongly interconnected, that … Read more