Skip to:

Advice Needed: Combining WP and BP Loops on a Page

  • timgreenleaf


    I am looking for general advice and maybe help strategizing how to do this:

    I want to set up a custom, default page for 1) member listing, 2) member profile, 3) group listing, and 4) group detail where the output from the WordPress and Buddypress loops are combined. Essentially, the rendered page structure would look like this:

    [global header etc]
    [Content from the WP page editor]
    [dynamic Buddypress content for Members or Groups]
    [global footer etc]

    I successfully created a custom WordPress template for the member directory where I inserted /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/index.php as a PHP include right after the WP loop code is done. It works as long as it is a custom listing page (NOT set as the default for Members in Settings) but the members profile page is still the generic default. If I adjust the site settings to define this page as default for Members, it doesn’t work at all or it just ignores the content from the WP editor.

    Is it possible to do this inversely — e.g. insert the WordPress content loop into the Buddypress template? I haven’t had any luck. I am not even sure the WP loop is invoked when a core BP page (e.g. members or groups) is rendered.

    FYI, I’m on the latest version of BuddyPress and WordPress 4.4.2, and have implemented BP with the BP Project Framework plugin for my customizations. I am using Cumulo, a commercial theme that seems to be pretty good, and have that set up with a child theme (in case that matters here).

    I am new to Buddypress but have used WordPress for years (not a hard core coder but can write/edit code) and am familiar with how it works under-the-hood, but am not sure about the best approach here. Thanks in advance for any advice/guidance/ideas with what you think the best way is to do this!

  • You must be logged in to reply to this topic.
Skip to toolbar