Home>Support>Masonry – how to show both pages and posts

Masonry – how to show both pages and posts

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

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 9 months ago Alex S
    Hi, I Work Here

    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.

  2. 8 years, 9 months ago BushAl

    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

  3. 8 years, 9 months ago Alex S
    Hi, I Work Here

    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. :(

  4. 8 years, 9 months ago BushAl

    Thanks very much for your help – pagebuilder is great – just started using it and i suspect i will use it lots

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More