Tag Info

New answers tagged

0

thanks @BA_Webimax i've found the solution by using this query inside my subdomains pages to get datas from my main domain pages. main domain blog ID is (1). and sub domain for example are 2 and 3. <?php switch_to_blog(1); ?> <?php restore_current_blog(); ?> look like this to display on a page from a sub domain, all the titles from posts ...


0

What you can do is to set up a pre_get_posts() filter in the subdomains' theme functions.php file to restrict posts to the desired category... function my_subdomain_category( $query ) { if ( $query->is_main_query() ) { $query->set( 'cat', '123' ); // use the categoryID for space or products } } add_action( 'pre_get_posts', ...



Top 50 recent answers are included