2017 © Pedro Peláez
 

wordpress-plugin network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

image

devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 6 Versions
  • 102 % Grown

The README.md

Network WP Query

Latest Stable Version Latest Unstable Version License ![Build Status][travis-image], (*1)

A WordPress plugin that provides Network-wide WP_Query for Multisite environment., (*2)

This plugin is based on / a improved version of WP_Query_Multisite (a custom version of WP_Query_Multisite)., (*3)

Installation

Manual Installation

  1. Just copy all files into <ABSPATH>wp-content/plugins/network-wp-query/.

Manual Installation (as a Must-Use plugin)

  1. Just copy all files into <ABSPATH>wp-content/mu-plugins/network-wp-query/., (*4)

  2. Move network-wp-query/loader/50-network-wp-query-loader.php into <ABSPATH>wp-content/mu-plugins/., (*5)

Installation via Composer

  1. Install via Composer., (*6)

    composer require devaloka/network-wp-query
    

Installation via Composer (as a Must-Use plugin)

  1. Install via Composer., (*7)

    composer require devaloka/network-wp-query
    
  2. Move network-wp-query directory into <ABSPATH>wp-content/mu-plugins/., (*8)

  3. Move network-wp-query/loader/50-network-wp-query-loader.php into <ABSPATH>wp-content/mu-plugins/., (*9)

Example Usage

Standard Loop

 true]); ?>

have_posts()): ?>
    <?php while ($query->have_posts()): $query->the_post(); ?>
        <?php the_content(); ?>
    <?php endwhile; ?>

    <?php wp_reset_postdata(); ?>

Query to several specific Sites

 true, 'sites__in' => [1, 2, 3]]); ?>

have_posts()): ?>
    <?php while ($query->have_posts()): $query->the_post(); ?>
        <?php the_content(); ?>
    <?php endwhile; ?>

    <?php wp_reset_postdata(); ?>

Query excluding several specific Sites

 true, 'sites__not_in' => [1, 2, 3]]); ?>

have_posts()): ?>
    <?php while ($query->have_posts()): $query->the_post(); ?>
        <?php the_content(); ?>
    <?php endwhile; ?>

    <?php wp_reset_postdata(); ?>

Limit the number of posts per Site

 true, 'posts_per_site' => 1]); ?>

have_posts()): ?>
    <?php while ($query->have_posts()): $query->the_post(); ?>
        <?php the_content(); ?>
    <?php endwhile; ?>

    <?php wp_reset_postdata(); ?>

Parameters

Name Type Description
network boolint Whether perform network-wide query.
sites__in int[] Blog IDs to include in the query.
sites__not_in int[] Blog IDs to excluded from the query.
posts_per_site int The number of posts per Site to retrieve.

References

The Versions

12/06 2017

dev-master

9999999-dev https://github.com/devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  Sources   Download

GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

plugin wordpress multisite network wp_query

09/04 2017

v0.2.0

0.2.0.0 https://github.com/devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  Sources   Download

GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

plugin wordpress multisite network wp_query

02/04 2016

v0.1.3

0.1.3.0 https://github.com/devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  Sources   Download

GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

plugin wordpress multisite network wp_query

08/01 2016

0.1.2

0.1.2.0 https://github.com/devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  Sources   Download

GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

plugin wordpress multisite network wp_query

31/12 2015

0.1.1

0.1.1.0 https://github.com/devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  Sources   Download

GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

plugin wordpress multisite network wp_query

31/12 2015

0.1.0

0.1.0.0 https://github.com/devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

  Sources   Download

GPL-3.0 GPL-2.0

The Requires

 

The Development Requires

plugin wordpress multisite network wp_query