Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset doesn't work for "new WP_Query_Multisite"? #12

Open
Hanz17 opened this issue Dec 22, 2014 · 1 comment
Open

Offset doesn't work for "new WP_Query_Multisite"? #12

Hanz17 opened this issue Dec 22, 2014 · 1 comment

Comments

@Hanz17
Copy link

Hanz17 commented Dec 22, 2014

Hello, I don´t know, why offset doesn't work in my code. Can you help me with solution? Thanks :)

10, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish', 'offset' => 4, 'sites' => array( 'sites__in' => array( 1, 2, 3, 4, 5 ) ) ); $query = new WP_Query_Multisite( $args); while ( $query->have_posts() ) : $query->the_post(); ${'blog_url_'.$blog_key} = get_blog_option($blog_key,'siteurl'); $blog_odkaz = ${'blog_url_'.$blog_key} ; //Blog URL in Czech $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' ); $imageURL = str_replace( 'http://sportzine.eu', $blog_odkaz, $image[0] ); $imageTag = '

'; ?>

@openbayou
Copy link

Did you solve this? This should work:

10, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish', 'multisite' => 1, 'sites__in' => array(1,2,3,4,5), 'offset' => 4 ); $query = new WP_Query( $args ); while($query->have_posts()) : $query->the_post(); ?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants