Viewing 1 replies (of 1 total)
  • Dear stunomatic

    get all “companies” belongs to showed industry:

    $childargs = array(
        'post_type' => 'company',
        'numberposts' => -1,
        'meta_query' => array(
            array(
                'key' => '_wpcf_belongs_industry_id',
                'value' => get_the_ID()
            )
        )
    );
    $child_posts = get_posts($childargs);

    get all “incubators” belongs to showed industry:

    $childargs = array(
        'post_type' => 'incubator',
        'numberposts' => -1,
        'meta_query' => array(
            array(
                'key' => '_wpcf_belongs_industry_id',
                'value' => get_the_ID()
            )
        )
    );
    $child_posts = get_posts($childargs);

    Marcin

Viewing 1 replies (of 1 total)
  • The topic ‘Display Posts from Child "Post type"’ is closed to new replies.