Function Reference: gdlist_all_listed_posts

Summary

This function has not been documented yet.

Source File

gdlist_all_listed_posts() is located in geodir_list_manager/geodir_list_manager.php [Line: 504]

Source Code

function gdlist_all_listed_posts($post_id = null) {
    if ($post_id) {
        $post = get_post($post_id);
    } else {
        global $post;
    }
    global $bp;
    $user_id = $bp->displayed_user->id;
    $listed_posts = array();
    $all_postypes = geodir_get_posttypes();
    foreach ($all_postypes as $pt) {
        $args = array(
            'connected_type' => $pt.'_to_gd_list',
            'connected_items' => $post,
            //'nopaging' => true,
        );
        $args['posts_per_page'] = 3;
        $connected = new WP_Query($args);
        while ( $connected->have_posts() ) : $connected->the_post();
            ?>
            
  • ID, array( 20, 20) ); ?>

    'approve', 'number' => 1, 'parent' => 0, 'post_id' => $post->ID, // use post_id, not post_ID 'user_id' => $user_id ); $comments = get_comments($args); if ($comments) { ?> comment_content)), 20); ?>