<?php
query_posts(
array(
'showposts' => -1,
'post_parent' => $post->ID,
'post_type' => 'page',
'orderby' => 'title',
'order' => 'ASC',
'meta_key' => 'featured_product',
'meta_value' => 1
)
);
?>
For featured products.
<?php
query_posts(
array(
'showposts' => -1,
'post_parent' => $post->ID,
'post_type' => 'page',
'orderby' => 'title',
'order' => 'ASC',
'meta_key' => 'featured_product',
'meta_compare' => '!=',
'meta_value' => 1
)
);
?>
For normal product.
What I want is:
- If the child page has 'featured_product' and value equals "1" then it's featured. It works!
- If the child page has 'featured_product' and value not equal "1" OR it doesn't even have the field 'featured_product' then it's not featured product (this doesn't work at the moment).
Anyone? Thanks!
