Pass the same object to multiple widgets in a template with one query
I suggest to use the Object Cache API or Transients API, whatever fits better your needs. A very quick example with object cache: // helper function function get_my_object() { $object = wp_cache_get( ‘my_object’ ); if ( false === $object ) { $args = array( …. ); $object = new WP_Query( $args ); wp_cache_set( ‘my_object’, $object … Read more