Tag Info

New answers tagged

0

If you want to construct for example: http://example.com/?ref=1,8,22 for multiple administrators of the current sub site, you can try the following (untested): $uids = get_users( array( 'blog_id' => get_current_blog_id(), 'role' => 'administrator', 'fields' => 'ID', 'order_by' => 'ID', ...


0

The very important point that shouldn't be missed, and it's less talked about, is that you should still do have the line: define( 'WP_ALLOW_MULTISITE',... But it should be changed updated to define( 'WP_ALLOW_MULTISITE', 0 );


0

So far as we know, we can control the subdomain by the Wordpress subdomain network and apache rewrite rule(nginx works too.). The subdomain is a rule, so you can't set it directyly in .htaccess by using your http://www.supercooldomain.com, but you can set another apacahe virutal host use your cooldomain. There is another wordpress plugin may can help you. ...


2

Use get_current_blog_id() to check the current site. To run on site 2 only, use this: function new_meta_values($order_id) { if ( 2 !== get_current_blog_id() ) return; /* the rest of the function code */ }


0

This is my experience. I had to add role for each site in Wordpress, I developed an add page in dashboard so the site administrator can add the self-defined role/capabilities. But I found the $wp_roles->add_role, add_cap only works the subsite. So I did some fix, I've made a plugin, the super-admin(not site administrator but the "admin") can "Network ...


0

Try checking the file permissions. Many hosts require that the permissions be 644 for PHP files. In particular suPHP will usually block execution of files that even have 664 permissions. New files uploaded via FTP may not always get umasked properly depending on the FTP client and server setup.


3

I'll just put the main pros/cons that quickly came to my mind here. This list is not extensive. For some more info on MS have a look at at the Codex. Pro Multisite Maintain WordPress/Plugins/Themes just once. If you upgrade everything is upgraded at once Easily share content between sites. (e.g switch to blog) User Accounts can be cross-site Sites are ...


1

Yes, that should be enough if you don’t install poorly written plugins or themes. You should use PHP 5.5 and its built-in OPcache and a multisite setup for more sites. This will reduce load time and the resources you need for the sites.


1

You could modify it through the the_author filter: /** * Set the author name as the site title. */ ! is_admin() && add_filter( 'the_author', function( $author ) { return get_bloginfo( 'name' ); } ); where we change the author name to the site name on the frontend with the help of the get_bloginfo() function.


1

You need to check that when you are activating the plugin. WordPress will send a Boolean flag to let your function know that this is a network wide activation. register_activation_hook( __FILE__, 'activate' ); function activate( $network_wide ) { // $network_wide will be TRUE if activation is network wide if ( $network_wide ) { ... Do ...


0

If you're trying to convert an existing single-site WordPress installation a path-based Multisite, there's a note on the Codex: You cannot choose Sub-directory Install (for a path-based network) if your existing WordPress installation has been set up for more than a month, due to issues with existing permalinks. If you want to switch to a Multisite ...


0

Late to the party here but wanted to mention for the benefit of future searchers that we had the same need and built a plugin for cloning/duplicating with all settings intact just like the OP describes. It is called the NS Cloner, and it doesn't add a "Duplicate" action link as described here, but it makes the process almost that easy by creating an ...


0

Although why it happened isn't obvious, the problem was that the new users were missing wp_*_capabilities rows for the affected site in the wp_usermeta table.


0

This is normal behavior for WordPress. As with most things in WordPress, there is a plugin for what you are trying to do. Try this: https://wordpress.org/plugins/peters-login-redirect/


0

Your comments state that the line in question that gives the fatal error causing your white pages is this line: <div id="whatstrending"><h1><?php echo get_option('radio_options')['blog-header'];?></h1></div> Most notably: get_option('radio_options')['blog-header']; Or more specifically: functioncall()[] This is invalid ...


0

Use network_home_url( $path = '', $scheme = null ). You can see it in /wp-includes/link-template.php. Examples: // Root of main site $network_home = network_home_url(); // About page on main site $network_about = network_home_url( 'about/' ); In a network, the main site has always the same ID as the network ID. network_home_url() uses get_current_site() ...


2

There's a filter called all_plugins that seems to do the trick for me: add_filter( 'all_plugins', 'wpse156903_hide_plugins' ); function wpse156903_hide_plugins( (array) $plugins ) { // let's hide akismet if( in_array( 'akismet/akismet.php', array_keys( $plugins ) ) ) { unset( $plugins['akismet/akismet.php'] ); } // hide multiple ...


0

In a wordpress network the users are of the network and not an individual blog in the network. This means that technically users do not login to a blog they can only login to the network. If I understand your question correctly, you have nothing to do for what you want, this is how a network works - once you are logged-in, even if it was done in the context ...


0

In case anyone has a similar problem the answer was a lot more complicated than I thought. It turns out that NameCheap (my hosting company) installed a different SSL cert incorrectly. It was causing a redirect to another site, which applied it's .htaccess rules, adding the "www".


0

If you're using caching, turn it off. Make sure your .htaccess is correct, and turn off all your plugins. For more detailed info Click here


1

The online resources I've read suggest this will allow me to use different plugins and themes on the two sites whilst allowing a search from either site to bring up results from both sites. Is this correct? Yes, is correct. In multisite environment you can install different plugins/themes for different sites. Once the database is the same, you ...


0

Did you check your ISP's setting? E.g. in Dreamhost's control panel you have these 3 options: Do you want the www in your URL? Leave it alone: Both http://www.domain.com/ and http://domain.com/ will work. Add WWW: Make http://domain.com/ redirect to http://www.domain.com/ Remove WWW: Make http://www.domain.com/ redirect to http://domain.com/


2

It sounds like it's not possible with stock WordPress Multisite to have a subdomain network from a WordPress-in-a-subdirectory installation: WordPress must run from the root of your webfolder (i.e. public_html) for subdomains to work correctly. They will not work from within a subdirectory. -- Before You Create a Network


0

Ok some wise guy deleted my last post. The answer, which the above member (@etc) gave to me on another forum, and is working quite fine, is as follows: # Rewrites for Bedrock Multi-Site Subdomain Setup rewrite /wp-admin$ $scheme://$host$uri/ last; rewrite ^/(wp-.*.php)$ /wp/$1 last; rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last; He revised his ...


1

Google App Engine is a third party host and dealing with them is really off topic here. That error is a simple permission and/or file error and has nothing to do with WordPress itself. You're beter off asking at Google http://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/ or trying https://wordpress.org/plugins/google-app-engine/


1

I haven’t tested it, but it should be possible with these steps: Use example.net (not .com) as main installation for the multisite (or areallybigteam.com). Install WordPress with subdomains. Create the sites. Edit the URLs of all sites as you need: blog.example.com, team.example.com and areallybigteam.com. Make sure the document root for all these ...


1

Yes, get_site_option() is for data about the whole network. The irritation comes from a mixed vocabulary: what was a site once is a network nowadays, and what was a blog once is now a site in a network. wp_get_sites() for example is from version 3.7, it fetches sites in a network, not all networks in an installation. So a site in wp_get_sites() is not the ...



Top 50 recent answers are included