Tag Info

New answers tagged

0

A blank page usually indicate that you have some php error. You should look at your PHP error log file and try to fix the error if there is one.


0

Yes, all the WordPress Multisite users go into the {$wpdb->prefix}users table; that way they form a pool of users that can each be given access to one or more sites in your network. You can get the users for a given site by using get_users(), which can take as an argument the ID of a given site: // get users for site example.com/my-site $args = array( ...


0

Well, actually, you should view your site as requiring "multilingual" capabilities, even if the base language for both countries is identical, because the actual locale for each is nevertheless different. More specifically, you can create variant "translations" for your British ('en_GB') and Irish ('en_IE') localizations. A plugin such WPML (WordPress ...


4

update_option( $name, $side_ad ); Your issue here is that update_option stores the value in the options table of the site. However you're on a multisite, and your install contains multiple sites/blogs, each with their own options tables. As a result, editing a user on blog/site A will not change the option on blog/site B, in the same way that painting a ...


0

Ok. Then you can use template_redirect hook and wp_is_mobile() conditional tag. wp_is_mobile() will work on device only. If you resize the window then it will not work. Now you can try this kind of code in your functions.php file add_action('template_redirect', 'redirecting_to_mobile_site'); function redirecting_to_mobile_site(){ if( wp_is_mobile() ){ ...


0

You can use the login_redirect filter: add_filter( 'login_redirect', 'wpse_159078_login_redirect' ); function wpse_159078_login_redirect( $redirect ) { if( ! current_user_can( 'update_core' ) ) { // if it's not a super admin that's logging in $redirect = get_home_url(); } return $redirect; } References login_redirect filter ...


-1

Try using anonymous windows in your browser or separate log ins. For e.g. I'm using Chrome and I can set up different browser accounts with different emails and passwords. It's kind of a cheat-solution, but it works fine:)


0

The order in which any plugins are loaded is not guaranteed and should not be relied upon. Instead, if you have processes which should happen after the plugins are loaded, then you should put those inside a function and then connect that function to the plugins_loaded action hook.


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/



Top 50 recent answers are included