This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Post Loop Widget

9 years ago · Last reply by Alex S 9 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. naz 9 years, 28 days ago

    Figure it I entered the following and i t worked;

    meta_key=sale_or_rent&meta_value=sale
  2. Alex S Staff 9 years, 25 days ago

    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.

Have a different question or issue?

Start New Thread