Categories

Getting pages by meta_key value

The following example shows how to query posts that have a custom filed name color and the assigned value is red.

$red_pages  = query_posts('post_type=page&meta_key=color&meta_value=red&orderby=menu_order&order=ASC');

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

IMPORTANT! To be able to proceed, you need to solve the following simple math (so I know that you are a human) :-)

What is 10 + 2 ?
Please leave these two fields as-is: