Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    I am not very familiar with BuddyPress, but some brief experimentation suggests that pages like the members directory are modified by BuddyPress so that custom post metadata is not accessible (for me, even content on the member directory page does not show). So it looks to me like the individual page settings won’t be honored due to how BP is set up. I am able to prevent the featured image output on the member directory by adding this function to my site:

    add_filter( 'display_featured_image_genesis_skipped_posttypes', 'prefix_buddypress_remove' );
    function prefix_buddypress_remove( $post_types ) {
    	$post_types[] = bp_is_members_directory(); // member directory
    	$post_types[] = bp_is_group(); // assume this is for groups
    	return $post_types;
    }

    You may need to experiment to see what conditional functions BuddyPress offers and which give you the results you want, but this is what I would try. You can add this function to your theme’s functions.php file, or to wherever you keep code snippets for your site. Please back up your files, practice safe coding, etc. etc. Hope this helps–

    Thread Starter collardin

    (@collardin)

    Thanks for this amazingly fast and useful response. I love this plugin!

    Filter works perfectly with small adjustment below. Group directory reference is bp_is_groups_directory(). I also added reference for individual member and group pages to your code:

    add_filter( ‘display_featured_image_genesis_skipped_posttypes’, ‘prefix_buddypress_remove’ );
    function prefix_buddypress_remove( $post_types ) {
    $post_types[] = bp_is_members_directory(); // member directory
    $post_types[] = bp_is_groups_directory(); // group directory
    $post_types[] = bp_is_user(); // for individual member pages
    $post_types[] = bp_is_group(); // for individual group pages
    return $post_types;
    }

    Plugin Author Robin Cornett

    (@littlerchicken)

    Awesome! Glad to know that helped, and thank you for sharing and explaining the conditionals so that others have it as a resource.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fallback image forced for 'group' and 'member' pages (BuddyPress)’ is closed to new replies.