Home>Support>Post Loop Widget

Post Loop Widget

By naz, 8 years ago. Last reply by Alex S, 8 years ago.
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].

Hello

For the Post Loop Widget I would like to add the code equivalent of this into the Additional field in the Build Posts Query box;

$featured = array (
    'post_type' 	 => 'custom_post_a',
    'meta_key'		=> 'select_yes_no',
    'meta_value'	=> 'select_yes'
);

$featured_posts = new WP_Query( $featured );

I can select ‘custom_post_a’ using the Post Type drop down, but how do I add the meta_key and meta_value criteria to the Additional field I have tried the following to no avail.

$featured = new WP_Query( array ( 'meta_key' => 'select_yes_no', 'meta_value' => 'select_yes' ) );

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, 5 months ago naz

    Figure it I entered the following and i t worked;

    meta_key=sale_or_rent&meta_value=sale
  2. 8 years, 5 months ago Alex S
    Hi, I Work Here

    Hi Naz,

    I’m glad you were able to resolve this issue. I’m, sorry I wasn’t able to be of assistance this time. Please be sure to post another thread if you have any other questions.

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