WordPress.org

Ready to get started?Download WordPress

Forums

multiple custom post types by category (1 post)

  1. BaberAhmed
    Member
    Posted 3 years ago #

    Hi All,

    First time posting so please forgive me if I am posting in the worng section.

    I trying to write a query that will recover all posts including custom post types for a particular category.

    I have tried the following but it does not seem to bring back the expected data, I am running the query in archives.php which part of "simon-wp-framework" theme.

    $custom_posts = new WP_Query(array('category' => trim($_REQUEST['cat']),'post_type'=> array( 'post', 'analysis', 'reports', 'videos')));

    Many thanks in advance for your help
    Bob

Topic Closed

This topic has been closed to new replies.

About this Topic