• Resolved henri

    (@riri23)


    Hi I use custom fields on my blog and I want to display in the loop only post with a specific custom field meta value.

    Currently I use this trick :

    <?php if (get_post_meta($post->ID, 'custom_field_disponibilite', true) == 'ND') continue; ?>

    But with this, the post number is inferior to the post number select in the admin area.

    I think I can use a add_filter or add_action inside the function.php of my theme but I have no idea how to implement it.

    Thanks for your help

Viewing 16 replies (of 16 total)
  • Thanks esmi.

    I was just having trouble getting pages in addition to posts to show. The link to the Custom Field Parameters you posted tipped me off:
    'post_type' => 'any'and it worked beautifully.

Viewing 16 replies (of 16 total)
  • The topic ‘how to filter the loop with custom fields’ is closed to new replies.