Tag Info

New answers tagged

0

You can use this filter: wpmu_blogs_columns More info: https://developer.wordpress.org/reference/hooks/wpmu_blogs_columns/


0

You can edit the wp-config.php file. Here is the codex article. You just need to edit the db user and database. define( 'DB_NAME', 'MyDatabaseNameofSubDomain' ); define( 'DB_USER', 'MyUserNameofSubDomain' ); Although I am not sure that you've meant: subfolder networks I mean the one is a domain and the other is a subdomain. Subfolder is ...


1

I generally merge their ID arrays and make a third query. To keep first set of queries cheap I only return their ID's using fields parameter like this: //setup your queries with extra parameter fields => ids $query1 = new WP_Query(array('fields' => 'ids','other_parameters' => 'etc')); $query2 = new WP_Query(array('fields' => ...


1

This has to do with the cookie domain. It is set for each domain, which prevents network-wide logins. You can try setting define( 'COOKIE_DOMAIN', '' ); in your wp-config.php, which prevents WordPress from changing the cookie domain for each site. Don't ask me about drawbacks, because I'm not entirely sure about that. Another possibility could be to set one ...


1

When loading blog B (thankfully) it doesn't load plugins which are active on blog A only, and switch_to_blog() (thankfully) doesn't do that either. You could trigger the update by using something like the JSON API (or XML-RPC, ewwww), or you could make sure the post type is registered both on blog A and blog B. Maybe set show_ui to false on blog B so it ...


0

This is what I suggest get your RSS feed for site A http://codex.wordpress.org/WordPress_Feeds Install this plugin to Site B https://wordpress.org/plugins/rss-post-importer/ It has the option to grab the post and save as draft. As for email you might need to add some code to send an email out when a new post is added. function SendOutEmail($to, ...


1

Yes is possible. The only thing is that you will have "two sets" of permalinks: example.com/2015/07/27 example.com/new-website/2015/07/27 Here is a codex article that explains that. Edit 1: Here is a more detailed article on the topic with it's pros/cons and potential issues.


0

I solved it by doing using this code: global $current_site; $current_site_id = $current_site->id; $args = array( 'network_id' => $current_site_id, ); $site_info = wp_get_sites( $args ); $num_of_sites = sizeof($site_info); If anyone has a more elegant way of solving please post your answer.


0

I finally got it to work after a long time of trying to figure this out! Credit to Samuel Elh for helping me, http://sam.elegance-style.com/ This is useful if anyone wants to allow users to make small style changes to a theme. Rather than create many child themes, if you just need some stylesheet overrules to make changes to a theme, this is ideal: /* ...


0

Basically all you need to do is to import all the posts/pages from the sub-site to a new URL. First you will need to setup a new, fresh WP install e.g example.local (on localhost), then you need to export all the contents from your website (e.g example.com) on remote server, finally import all the contents (using XML file from step 2) to example.local ...


2

Excuse me if I'm misunderstanding you, but aren't the functions add_site_option(), update_site_option() and get_site_option() pretty much, they fall back to single site functions, if not used in a multisite environment, only there for the purpose of having network-wide options. Update: Regarding your need to change a single site option for all sites in ...


0

Before you select WordPress Reset to use, please check Plugin Author comments here. You can only use this plugin on the sub-sites, not the parent/master site of the multisite install. On each sub-site you use it on, it should reset the sub-site back to the original, just installed/created status. This plugin has never really been tested on multisite, so ...


0

Hay In wordpress theme you can add option panel you can not registre script or wp_enqueue_scripts you can add /*-----------------------------------------------------------* /* THEME OPTION ADMIN PRINT SCRIPT EXAMPLE /*-----------------------------------------------------------*/ add_action( 'admin_menu', 'ease_print_script' ); function ...


0

Child theme's can have their own header.php file, right? So why not just simply drop a child header.php file into the child theme's folder, then add the code there? Unless I'm missing something, this does seem to be the simplest solution.


0

I've had this happen on a multisite before and what I ended up doing was programmatically deactivating/reactivating the plugin again using activate_plugin and deactivate_plugins. And it seemed to show up in my case. The plugin that wasn't showing up in my case was Post Type Switcher, a Network Plugin. //deactivate/reactivate the plugin on theme switch ...


0

This does not yet seem possible, due to the lack of filters to be used: https://core.trac.wordpress.org/ticket/26580


5

You can clearly see the way WordPress loads plugins if you inspect the source code of the file wp-settings.php. The function wp_get_active_and_valid_plugins() loads plugins for individual sites in the network and for non-Multi-Site installations, while wp_get_active_network_plugins() loads network activated plugins when Multi-Site is enabled. The former ...


1

If you use switch_to_blog, that use always also restore_current_blog. The restore_current_blog function undos the last call to switch_to_blog, but only by one step, the calls are not nestable, so always call restore_current_blog before calling switch_to_blog again.



Top 50 recent answers are included