Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hi, I am using your Masonry Widget and it seems great.
However I am trying to put together a page made up of both pages and posts and cant find a query post query that works in the additional entry.
I have tried various things of the type ‘post_type’ => ‘all’ or ‘post_type’ => array( ‘post’, ‘page’). It seems the Post Type is overriding the Additional (or i am doing something wrong)
Ideally I would like to show all posts with cat = x and and a list of page ids.
Thanks for anything that gets me closer to this
Hi BushAl,
Could you please clarify what widget you’re using? The only Masonry widget that’s included with the SiteOrigin Widget Bundle doesn’t make use of the post query builder.
Regardless, you can bypass the post type field by setting post type and then setting it to equal page, post.
In other words, your additional field will look like so:
post_loop=page,post
To clarify, this field does not support PHP.
—
Also, what you’re trying to do isn’t actually possible as WP_Query only allows for AND rather than OR situations. In other words, if you specify cat, pages won’t be included pages do not have categories. Your query needs to account for both.
Hi, apologies for the confusion, the widget is the one loaded by the SiteOrigin Masonry plugin which is writen by Greg Priday. It is not in the widget bundle, but there is discussion of it on SiteOrigin.
I tried post_loop=page,post but this still only displays either posts or pages.
Thanks for your help
Hi Bush,
Oh. Unfortunately, you’re unable to select both post types in that widget, and sadly there’s no way to avoid this limitation. Sorry mate. :(
Thanks very much for your help – pagebuilder is great – just started using it and i suspect i will use it lots