Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

embed wordpress group (6 posts)

Started 1 year, 11 months ago by: 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?

  • Profile picture of r-a-y r-a-y said 1 year, 11 months ago:

    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:

    http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

  • 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 picture of r-a-y r-a-y said 1 year, 11 months ago:

    You’re passing the parameters wrong.

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

  • 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 picture of r-a-y r-a-y said 1 year, 11 months ago:

    Create a Wordpress page and apply a page template first.

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

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