Last active
May 6, 2019 20:03
-
-
Save mpro9x/7e8efd4c49cf295dee705a7d9cc1cd3c to your computer and use it in GitHub Desktop.
BuddyPress Create Event In Group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (is_user_logged_in()): ?> | |
<a class="crt-btn" href="<?php echo bp_loggedin_user_domain(); ?>events/create/">Create Events</a> | |
<?php else: ?> | |
<a class="crt-btn" href="http://nabetalk.16mb.com/login/">Create Events</a> | |
<?php endif ?> | |
<a class="crt-btn" href="<?php echo bp_loggedin_user_domain(); ?>events/create/">Create Events</a> | |
//it's only for the create event in *group name* | |
<?php | |
// check for a group ID | |
if( bp_has_groups() ) { | |
// Grab current group ID | |
bp_the_group(); | |
$group_id = bp_get_group_ID(); | |
} | |
?> | |
<?php if (is_user_logged_in()): ?> | |
<a class="crt-btn" href="<?php echo bp_loggedin_user_domain(); ?>events/create/">Create Events in <?php echo bp_get_group_name( groups_get_group( $group_id));?></a> | |
<?php else: ?> | |
<a class="crt-btn" href="http://nabetalk.16mb.com/login/">Create Events in <?php echo bp_get_group_name( groups_get_group( $group_id));?></a> | |
<?php endif ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment