Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Afnan Abbasi
    Participant

    @afnangulabbasi

    Hey dude,

    I don’t know if you got this done by now but here is a solution to your problem. I was going through the same issue and I knew what to do.

    Use this php snippet:

    <?php 
    
    $query = new WP_Query(array(
        'post_type' => 'bp-member-type',
        'posts_per_page' => -1,
        'post_status' => 'publish'
    ));
    
    while ($query->have_posts()) {
        $query->the_post();
        $post_title = get_the_title();
        echo $post_title;
        echo "<br>";
    }
    
    wp_reset_query();
    ?>

    This will retrieve all the member types names from the “bp-member-type” custom post type.

Viewing 1 replies (of 1 total)
Skip to toolbar