Tag Info

New answers tagged

0

1) when i logged in my www.mydomain.com it shows network in dashboard.I am not getting it why it shows here Your site and its subdomains are all on the same network, and you'll need a way to get to the network admin panel. Only super admins can reach this area. Normal users will not have access or the menu entries for the network admin. They may see a ...


0

Layouts and menus will not be a problem to apply to site and subsites. You may encounter complications if you want to share the data between them (as the only way to let's say share a post or other content is to post it multiple times on each subsite that you want that content to show in). It all depends on how you envision the site browsing experience, ...


0

At first glance, it may be a simple matter of backing up the database (which holds all the network/sites tables) and injecting it in your production database (using phpmyadmin for instance). You will need to seek and replace in the sql file all references to your local server and replace with domain name (make a backup copy first). Tables you will need to ...


0

I use Advanced Access Manager plugin to manage rights and permissions with users and roles. First, don't change administrator capabilities or you also lose those. Instead, select the User you want to change the permissions for and adjust that person's Admin settings.


0

You could use the switch_to_blog() function Switches the active blog until the user calls the restore_current_blog() function. This function is useful if you need to pull posts, or other information, from other blogs, you can then switch back after using restore_current_blog(). Using this function will not load plugins that only run on the blog ...


0

You should be able to move WordPress multi-site the same way you would any other WordPress site. Assuming your development environment is similar to production then yes. Moving a WPMU isn't hard but can be tricky. The Codex has pretty good documentation on how to do this. If you try with the command line and run into trouble with a fast approaching ...


0

The most flexible approach is to wrap this functionality into a plugin. If you drop this in your mu-plugins folder it'll automatically be used on all sites. Alternatively you could just network activate it to achieve the same effect. The advantage to this approach is that you can easily turn it on or off and it makes this aspect of your site modular which ...


2

Why not use get_comments(), instead of trying to roll your own with $wpdb? function display_sitewide_comments() { $sites = wp_get_sites(); $network_comments = array(); $max = 20; foreach( $sites as $site ) { switch_to_blog( $site->blog_id ); $args = array( 'number' => $max, 'status' => ...


4

Probably this issue: Multisite subdirectory install breaks if network path has uppercase letters. https://core.trac.wordpress.org/ticket/27866


0

Activate the plugin as a network plugin. Go to Network Admin/Plugins (wp-admin/network/plugins.php), and activate it there. Before you do that, deactivate it on the single sites.


0

I currently use a switch statement to set the DOMAIN_CURRENT_SITE I set it up to work when deployed on the live server. The switch also sets DOMAIN_CURRENT_SITE for when I'm working locally on my development machine. (thus all the .dev top level domains) After the switch statement, I define the other things that don't change but are MULTISITE related. ...


0

Hi this is what I did to solve it: add_filter( 'script_loader_src', 'change_src' ); add_filter( 'style_loader_src', 'change_src' ); function change_src( $url ) { if( is_admin() ) return $url; // Don't filter admin area return str_replace( site_url(), 'www.mysite.com/mydefaultnetworksite', $url ); } I'm using both those filters because I want ...


3

You can disable certain themes in your WordPress network. Go to http://www.yournetwork.com/wp-admin/network/themes.php click on 'network disable' to hide the themes for the other websites. You can enable a theme for a single site by searching for the site -> click on 'themes' -> click enable at the desired theme. Hope this helps.


1

So, thanks to kaiser, I was able to figure it out. I had to do two things to make this work. First, I noticed that disabling the WP User Avatar plugin was causing the errors to disappear. I looked and realized that a setting was checked "allow subscribers and contributors to edit their avatars." Unchecking it and saving it for each site made the errors ...


0

Here is an alternative way of doing it: /** * Get the blogs of a user where they have a given role. * * @param int $user_id The ID of the user. * @param string $role The slug of the role. * * @return object[] The blog details for each blog the user has the role for. */ function get_blogs_of_user_by_role( $user_id, $role ) { $blogs = ...


2

Do you have any data showing that user meta won't work? Until you do — don't mess with it. You are not likely to get from-scratch solutions as convenient and more performant without significant effort.


1

I could take advantage of get_template_part( $slug, $name ) and use it like: get_template_part( 'theme-options', get_current_blog_id() ); Say we are on blog_id 5, if theme-options-5.php exists it will be loaded. If not theme-options.php will be loaded as a fallback. Please note that get_template_part is using require.


0

You just need the last part of your function where you switch to blog 1 and get the menu. function wp_multisite_nav_menu() { $args = array( 'menu' => 'Main Menu', 'theme_location' => 'main-nav' ); switch_to_blog( 1 ); echo wp_nav_menu( $args ); restore_current_blog(); }


0

This would take a little bit of work, but you could adapt code from this plugin: http://www.mihaivalentin.com/different-wordpress-theme-depending-of-the-current-user/ First you would point all the domains to the same site. This plugin changes the current theme depending on the user logged in. But you could change the logic to change the theme depending ...


1

There is nothing happening at one month, and nothing "locks" permalinks. There is no actual difference in the system, the only difference is in the initial multisite configuration interface. When you first define WP_ALLOW_MULTISITE to true, and visit the network screen, you get the initial setup menu which lets you set up the configuration. It looks much ...


0

I don't use MU and I can't test this right now but... If you started with a fresh 3.8.1, then your .htaccess file should look like this (per the Codex): RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond ...


4

The actual RAM you need depends on many factors: plugins theme installed extensions (server and PHP) the current operation (editing images needs the most) translation, some translation files are really heavy In a multisite, some resources are shared, the server setup for example is not duplicated each time you create a new site. You can save some ...


4

The number of sites is unrelated to the amount of memory required. The amount of required memory is (if you are using Apache) the amount of memory required to serve the most memory intensive page * the number of requests you want to serve simultaneously Both numbers vary based on the way you set your server and the themes and plugins you use.


0

To achieve this functionality, You will need to install same Theme across all network website and enable it by default for them.


0

Short answer: yes. Long answer: The Customize API uses one of two methods for storing customizations: the Settings API or the Theme Mods API (the latter being the default method). Thus, all changes are saved to the database, either as a Theme-defined option, or via theme_mods_{themeslug}. When the Theme is updated, the Theme files in ...


0

I have my LDAP issues as well. Can you check and see if its not a firewall issue? Usually LDAP directories are behind firewalls and you need to make sure that the connection between your WP and the LDAP directory is open. Also check for if the ldap directory needs to be connected over SSL.


0

I think I figured this out. I wanted to leave my findings here with the hope that others can correct anything I may have erred on or findings I have misinterpreted. Testing Method: I set up a new vagrant install with a lamp stack (sudo apt-get install lamp-server^). I first set up wp_cli -- the commandline tool akin to drush -- which sped along the ...


0

If you're using the category archive template you do not need to create a new WP_Query instance. Just filter the main query using pre_get_posts(). Put this in functions php or a plugin: add_action( 'pre_get_posts', wp_se_pre_get_posts' ); function wp_se_pre_get_posts( $query ) { if ( is_admin() || ! $query->is_main_query || ! is_category( ...


0

This turned out to be a setting error on my part. In Network Admin > Sites > Settings for blog /, I had not updated the File uploads URL field. One little variable ....


0

It is rather easy to make WP think it is served from different domain by defining WP_HOME and WP_SITEURL constants in configuration dynamically for request. See Editing wp-config.php in Codex for details. However this only affects dynamically generated elements. Everything that is part of content isn't modified by this, including but not limited to content ...


2

What I would do is create a parent theme that is used on one site and a child theme of that theme for all other sites. In the parent theme's header a you would do a regular wp_nav_menu() call to build your menu, except you wouldn't echo it. Instead return the menu into a variable, pass that to update_option and then echo it. In your child theme's ...


0

I'm in a similar process and so far the redirects work fine for me. Maybe have a look at the following issue Changing subdir multisite install to subdir core directory structure and see how they resolved it.


1

I am using Wordpress 3.8.1 and I changed line 67 of wp-admin/network/upgrade.php and added , 'sslverify' => false like this: --- a/wp-admin/network/upgrade.php 2014-03-29 14:31:28.081943490 +0100 +++ b/wp-admin/network/upgrade.php 2014-03-29 14:30:52.785947460 +0100 @@ -64,7 +64,7 @@ $upgrade_url = admin_url( ...


1

add_filter( 'the_posts', 'wpse138563_add_posts' ); function wpse138563_add_posts( $posts ) { if( ! is_multisite() ) { // if we're not using Multisite, bail return; } if( is_main_site() ) { // if we're in the root site, bail return; } $country = get_bloginfo( 'name' ); // This assumes that the categories ...


0

I do not believe that is possible zutto. WP multi-site requires you to select either subdomain or subfolders for organizing your network. It is a one or the other, not both I'm afraid.


2

Use the default export plugin and use a new install, Single mode. Import the XML file and done. All other options have more todos and risk.


0

rewrite ^/(wp-.*.php)$ /wp/$1 last; rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last; These are the equivalent rewrite rules that you need. Note, when you use this rewrite, you no longer have to set the site_url as /wp I need to finish up some testing but will update here with the results.


0

you can manually put this on your wp-config.php:: define( 'MYUPLOADSPATH', '\\\\myserver\myfolder' ); define( 'MYCDNURL', 'http://cdn.mydomain.com' ); and this on your functions.php: update_option('upload_path', MYUPLOADSPATH); update_option('upload_url_path', MYCDNURL);


0

I recently answered a very similar question. Instead of having 2 separate websites, it's far easier to install a translation plugin. The plugin will basically add extra fields or tabs in edit mode. For example, if you are editing a page titled "Home", you will have a field for the English page title and then a field for the Spanish page title. The same ...


1

It would be far easier to maintain the blog by using a good WordPress translation plugin. WPML (http://wpml.org) is my favourite plugin for the task. If you prefer not to pay anything QTranslate is also a good option. Both plugins allow you to have sub domains (en.mysite.de) or language folders (mysite.de/en). Best of luck!



Top 50 recent answers are included