WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Buddypress Group Events (11 posts)

  1. dswright
    Member
    Posted 10 months ago #

    Hi,

    Is there a way to show a calendar for group events?

    http://wordpress.org/extend/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 10 months ago #

    try to modify template file at wp-content/plugins/events-manager/templates/buddypress/my-group-events.php

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

  3. needle
    Member
    Posted 10 months ago #

    The following to works for me...

    Call the calendar with a group param:

    $args = array( 'group' => bp_get_current_group_id() );
    em_calendar( $args );

    and make sure it gets passed through all the default search filters:

    function my_calendar_get_default_search( $args, $args2, $args3 ) {
    	if ( isset( $args2['group'] ) ) {
    		// pass value onwards
    		$args['group'] = $args2['group'];
    	}
    	return $args;
    }
    
    add_filter( 'em_calendar_get_default_search', 'my_calendar_get_default_search', 10, 3 );
    add_filter( 'em_events_get_default_search', 'my_calendar_get_default_search', 10, 3 );
  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 10 months ago #

    thx for sharing!

  5. dswright
    Member
    Posted 10 months ago #

    Thank you,
    I will have to give it a try and get back to you if it worked, which I have no doubt it will

  6. dswright
    Member
    Posted 10 months ago #

    I know you should only have one question per thread but @needle is there a way to have a calendar on your profile events page?

    http://www.mysite.com/members/username/events/

    ?

  7. angelo
    NetWebLogic Support
    Posted 10 months ago #

    try to modify template file at wp-content/plugins/events-manager/templates/buddypress/profile.php and then add

    <h4><?php _e("My Calendar", 'dbem'); ?></h4>
    <?php echo do_shortcode('[events_calendar long_events=1 full=1]');  ?>

    e.g. copy within your theme directory

    wp-content/themes/[Your Theme]/plugins/events-manager/buddypress/profile.php

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

  8. dswright
    Member
    Posted 10 months ago #

    Hi @angelo_nwl
    Thank you for the reply, this however will show all the events and not individual events.

  9. angelo
    NetWebLogic Support
    Posted 10 months ago #

    try to add owner search attribute

    e.g.

    <?php echo do_shortcode('[events_calendar long_events=1 full=1 owner="'.$bp->displayed_user->id.'" ]');  ?>
  10. dswright
    Member
    Posted 10 months ago #

    @needle sadly this does not work.
    I still get a calendar of all events

  11. needle
    Member
    Posted 10 months ago #

    are you sure bp_get_current_group_id() returns the appropriate value?

Reply

You must log in to post.

About this Plugin

About this Topic