WP Multisite: load content from site X on site Y

You can just use the function switch_to_blog before running the WP_Query on your post_type “projects”. Switch the current blog to a different blog. switch_to_blog(), is useful if you need to pull posts or other information from other blogs. Sounds like this is what you want. So lets say you have your content on the main_site. … Read more

What’s the best way to use the Featured Image for responsive web design?

Step 1: Define two custom image sizes, e.g.: <?php add_image_size( ‘normal-thumbnail’, 400, 300, false ); // Default image size add_image_size( ‘mobile-device-thumbnail’, 200, 150, false ); // Mobile-device image size ?> Step 2: Implement your chosen means to determine client. There are several ways, and which method you use is outside the scope of this question. … Read more

Excluding iPad from wp_is_mobile

t f’s answer got me thinking. Actually, I can use the core function and adapt it as I like but just put everything in a new function. So here goes: function my_wp_is_mobile() { static $is_mobile; if ( isset($is_mobile) ) return $is_mobile; if ( empty($_SERVER[‘HTTP_USER_AGENT’]) ) { $is_mobile = false; } elseif ( strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Android’) !== … Read more