adding an SQL post query into wp_query
-
I am developing a miltisite network Marketplace.
I can pull posts from all of my children blogs via an sql query, but is there a way that i can add this into an already declared WP_Query(); ?
I have posted some pastebins to make life that little easier lol.
1) This is a function that queries posts ready for a “Portfolio” page template:
http://pastebin.com/vX8B7QQrNotice the $portfolio_query = new WP_Query($portfolio);
The page template loop starts (minus all the other stuff): $portfolio_query->have_posts2) I am using an sql query by pulling all PUBLISHED posts into an array. Im not an expert coder and i am still learning, & loving it so.
Could someone be kind enough to show there own FULL example of a multisite sql post query? i assume i need to use setup_postdata() somewhere in there too?
The general idea is to create the “Multisite” query, and somehow merge this query with the above declared $portfolio_query.
Any help or advice would be great.
ThankRory
The topic ‘adding an SQL post query into wp_query’ is closed to new replies.