• Hey There,

    I’m developing a site that has a couple of custom post types, post and as_seen_in. I need all the posts along with ordering them by month. I’ve managed to get all the posts in both custom post types with the following.

    $monthly = new WP_Query(array('post_type' => array( 'post', 'as_seen_in' ), 'posts_per_page' => -1, 'orderby' => 'date'));
    if( $monthly->have_posts() ) : while( $monthly->have_posts() ) : $monthly->the_post();

    However, within the loop above I only want to display the as_seen_in posts that have a specific meta key/value of display_on_main_page/yes

    If any one has any thoughts it would be greatly appreciated.

    Cheers,
    Simon

  • The topic ‘WP Query Customization’ is closed to new replies.