Ready to get started?Download WordPress


Posts without custom field ! (1 post)

  1. nnaass
    Posted 4 years ago #

    I want to get post that don't have a custom field.

    I have a few pages with custom field 'slides' to 'true'

    I want to get posts that don't have a the 'slides' custom field.

    The below parameters , doesn't work ! (I thought slides=false will work )

    $args = array(
        'parent' => 0,
        'sort_order' => 'ASC',
        'sort_column' => 'menu_order',
        'hierarchical' => 0,
        'offset' => 0,
        'pad_counts' => 1,
        'meta_key' 		=> 'slides',
        'meta_value'	=> 'false'

    Thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic