Skip to:
Content
Pages
Categories
Search
Top
Bottom

embed wordpress group

  • Profile photo of piphut
    piphut
    Participant

    @piphut

    Hello, I’m looking to embed a buddypress group page (for example lets say the slug is “private-group”) inside a regular wordpress page. Does anyone know what file I should INCLUDE or if there is an existing buddypress api call that will allow me to accomplish this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    You can either create a shortcode plugin that uses the BP activities loop, or create a PHP page template with the activities loop with the group parameters passed into it:
    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    Profile photo of piphut
    piphut
    Participant

    @piphut

    Hey @r-a-y, I’ve started going down the PHP page route but I’m having difficulty passing multiple filters into the call. Here’s what I have so far:

    if ( bp_has_activities( ‘object=groups’, ‘primary_id=2′) ) : bp_the_activity();

    but I’m getting an unexpected $end error. Using just 1 variable seems to work fine but the second breaks it. Thoughts?

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    You’re passing the parameters wrong.

    if ( bp_has_activities( 'object=groups&primary_id=2') ) : bp_the_activity();

    Profile photo of piphut
    piphut
    Participant

    @piphut

    crap, still giving me an unexpected $end. Using Exec-PHP plugin to process php code in pages. Any thoughts off top of your head?

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Create a WordPress page and apply a page template first.
    https://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    Do not use a PHP plugin like ExecPHP unless you really have to.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘embed wordpress group’ is closed to new replies.
Skip to toolbar