• I’m working on modifying the bbpress recent replies widget to show only posts which a user should be able to view based upon access restrictions. I thought maybe the reply custom post type wouldn’t work, but it seems to pull the replies (posts). However, it doesn’t respect the permissions of the user viewing the widget.

    I’m using the cool example here:
    https://github.com/eggemplo/Groups-Utilities/blob/master/groups-list-posts.php

    Do I need to initialize something before or in the widget code to make this happen? It’s still returning ALL posts, not just the posts a user should be able to read. I’m using the groups_read_post capability.

    Thanks for any insights!

    $recent_posts = Groups_Post_Access::the_posts(get_posts( array(
      'post_type'           => bbp_get_reply_post_type(),
      'post_status'         => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
      'posts_per_page'      => (int) $settings['max_shown'],
      'ignore_sticky_posts' => true,
      'no_found_rows'       => true,
    ) ) );

    https://wordpress.org/plugins/groups/

  • The topic ‘Modifying the bbpress recent replies widget’ is closed to new replies.