I hereby claim:
- I am danielhomer on github.
- I am danielhomer (https://keybase.io/danielhomer) on keybase.
- I have a public key ASBnJ0x1yTYyLlmfFW6EbSrnV4BvsjO97NsdEs8oMTOMMgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
true |
<?php | |
/** | |
* This filter will attempt to fetch a post from the main site if a post cannot be found | |
* on a child site. | |
**/ | |
add_filter( 'the_posts', function( $posts, $wp_query ) { | |
$network_id = get_network()->site_id; | |
if ( ( ( count( $posts ) === 0 && is_single() ) || is_archive() || is_home() ) && get_current_blog_id() !== $network_id ) { |