New answers tagged

2

This Plugin gives you a list of posts for each Site already, but it does not exactly do what you want to do. Basically, it gives you a list of all posts in your network. What you need to do afterwards is sort them by site_id and create an output for that. I do not know if this is the best version - but as WP_Query returns an one-dimensional array, you need ...


0

After a bit of debugging, I was able to narrow this down to the following: The menu that I had created to display across each site in the network was comprised of Custom post types that were not registered on any other subsite, only the main site (1). For whatever reason the custom post type must be registered on each site in the network where you will ...


0

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 ){ ...


-1

I managed to disabled the plugin but it was still there on the main site panel. The only solution I found to completly remove it from the main site was to check on the main.php of the plugin the site and disable it according to it: global $current_blog; // Only available to B if( $current_blog->blog_id == 2 ) { define( 'AB_PATH', __DIR__ ); ...


3

domain_exists() is something you probably won´t call by yourself. It is used in the registration/creation process of new sites in a Multisite installation. There it´s used to check if a specific blog URL is already in use: if ( domain_exists($mydomain, $path, $current_site->id) ) $errors->add( 'blogname', __( 'Sorry, that site already exists!' ...


1

As I was migrating from a multisite install, the problem was due to the fact that roles are named based on table names. So I solved my problem when I named option wp_7_user_roles to wp_user_roles.


4

Some of the more archaic code is still present in WordPress, notably globalising variables inside functions. A good example of thise is get_current_blog_id(), which is present in wp-load.php: /** * Retrieve the current blog ID. * * @since 3.1.0 * * @global int $blog_id * * @return int Blog id */ function get_current_blog_id() { global ...


-1

If your setup is the same every time (subdomain install), then you may be able to paste the entire chunk in your first step: define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); define( 'DOMAIN_CURRENT_SITE', $_SERVER[ 'HTTP_HOST' ] ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', true ); define( 'BLOG_ID_CURRENT_SITE', ...


0

I've ruled out this being an issue with Advanced Custom Fields, so I've made a new question. For more information, please look at: wp_get_attachment_image_src multisite issue


0

I am not sure how you are activating theme on Network but here I am considering a case of installing fresh theme on a existing Network. Activating theme on any single site will insert the term for every site in Network but yes of course taxonomy registration code should be there already. Consider this example function after_switch_theme_callback() { ...


2

As cdn.mydomain.com is not part of your WordPress network, it wont be affected by your settings. The COOKIE_DOMAIN constant should only be used if you want to serve cookies from a single domain for all your sites in the network. If you omit the constant or set it to an empty value, cookies will belong to the domain their requested from. Thats the ...


0

This happened because WPMU has an admin account that defaults to the same URL as the install. So my admin user, who is also the default user, let's call him "adminUser", could log in at http://www.example.com/blog/ He could update, add new posts, whatever and his posts show up at: http://www.example.com/blog/ But when new user, let's call him, ...


-4

Yes. Yes they can. In my testing and throughout the code you see switch_to_blog(another_blog); do_something(); restore_current_blog(); If you weren't able to do that I think WP would not run.


0

That's not possible with the default xampp. Windows can't work with the wildcard subdomains. The easiest way, that you switch to folder, directory structure. Alternative should help this answer with the customization of the vhost.



Top 50 recent answers are included