Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

I think you just have a typo. Changing the following made this work for me on multisite. Try changing this: add_rewrite_rule(substr(parse_url(get_template_directory_uri(), PHP_URL_PATH), 1) . "/manifest\.json$", "index.php?manifest=true", "top"); to this: add_rewrite_rule(substr(parse_url(get_template_directory_uri(), PHP_URL_PATH), 1) . "/...


1

Basically, you are doing one thing wrong, which is actually having a file named manifest.json inside /wp-content/themes/your-theme. So, first, delete your file /wp-content/themes/your-theme/manifest.json. Then, in your functions.php file you can have your rewrite rule as: function fvpd_pwa_rewrite_rules() { add_rewrite_endpoint( "manifest", EP_NONE ); ...


0

I ran into a similar issue some time back. I came up with an answer that does not fix the 404 issue, but takes a different approach in solving the issue, assuming your content of this json file is not set per user. Rather than having PHP run inside of that json file and changing the header of the file to reflect as much, why not have a manifest.php file sit ...


-1

I think that's because .json is considered to be a "static file". Which means PHP isn't triggered with the request. This kind of routing likely needs to occur at a server level.


1

If you know how WordPress is structured internally it should not be too hard. Here are the steps: For your site to migrate create a new site in the WordPress multisite environment (the information in the following tables must fit the new environment) wp_blogs (especially this) wp_blogs_versions (probably irrelevant) wp_registration_log (probably irrelevant)...


0

To enable Multisite without the plugin, connect to your site using a FTP client or cPanel file manager, and open the wp-config.php file for editing. You need to add the following code to your wp-config.php file just before the /* That’s all, stop editing! Happy blogging. / line. / Multisite */ define( 'WP_ALLOW_MULTISITE', true ); Once you are done, you can ...


0

This function in /themes/lucid-press-child/js/custom-js.js is your problem. function homepageNavigationClasses(){ if(jQuery('body.home').length){ //jQuery('#navigation a').not('.sub-menu a').click(function(event){ jQuery('#navigation a').click(function(event){ var clickedLink = jQuery(this).text(); clickedLink = ...


0

I heard about this plugin at the latest WordCamp in Vienna. It allows you to create a network of networks: https://wordpress.org/plugins/wp-multi-network/


1

Global attribute --url=<url> is required to post in a networked site. wp post create --url=subdomain.exampledomain.com [OPTIONS] Ref : https://developer.wordpress.org/cli/commands/post/create/


1

Ok here is how I did it: add_action( 'editable_roles' , 'hide_editable_roles' ); function hide_editable_roles( $roles ){ $blog_id = get_current_blog_id(); // Get current subsite id switch($blog_id) { // Define different max agents numbers depending on subsite id case 6: $max_agents = 10; //for subsite id#6 we can have maximum 10 agents break; ...


0

Maybe using insert_user_meta (inside wp_insert_user(), which is also called by wp_update_user()) could also be a viable method to block extra agents from being registered. set_user_role action might also be needed to prevent existing users from getting an agent role. // Maybe prevent setting new users to agent role function new_user_check_roles( $meta, $...


0

Update: There was a problem with my previous code based on some erroneous digging into WordPress roles and capabilities. The below code should work a little better now. You could maybe try hooking the map_meta_cap filter, something like this might work: add_filter( 'map_meta_cap', 'has_max_agents', 10, 2 ); function has_max_agents( $caps, $cap ) { ...


0

I just tested this on my local with a fresh subdmoain setup. Here's my setup: Created subdomain.test Added site: demo1.subdomain.test with the admin user demo1 Added site: demo2.subdomain.test with the admin user demo2 Now, if I go to http://subdomain.test/wp-login.php and login, I get the following results: User demo1 logs in to http://subdomain.test/wp-...


0

There's another possible cause of the loop when trying to access: /wp-admin/network/ There's a redirect triggered at the bottom of: /wp-admin/network/admin.php This checks that the current blog and current website have the same path and domain values, if they don't then the redirect occurs. Double check that the path specified in the wp_blogs table is ...


0

I believe that Multisite assumes that all sites are on the same server. That's because it uses the same WP database for all of the sites. (Although the databases can get quite large if there are many sites, and lots of content. So you need to make sure the hosting server can handle large databases.) So I don't see a way to do this (but I have been wrong ...


0

Add yourself as a user of that website. It will appear.


Top 50 recent answers are included