//Return user id or 0 if no user is logged in
get_current_user_id()
//Check for Page in snippets
add_action( 'wp_head', function () {
if ( ! is_page( [ your pages ids separated by comma ] )) {
return;
} ?>
your content
<?php } );
//Post points to "Wins"
mycred_add( 'approved_comment', get_current_user_id(), 10, 'Points for approved comment' );
// Will show the list of members who are friends with user id 1 and online
No members were found matching the current criteria.
//Add a shortcode to a template
echo do_shortcode('[shortcode-here]');
//Path to shortcodes folder
wp.letterhoops.com/wp-content/plugins/shortcodes-for-buddypress/admin/template
//MyCred Docs
https://codex.mycred.me/functions/mycred_add/
//WP Shortcodes
https://wordpress.com/support/shortcodes/
//Edit Event Form Location
/home2/letterhoops/wp.letterhoops.com/wp-content/plugins/events-manager/templates/forms/event-editor.php //Used for core form changes like hiding details section
/home2/letterhoops/wp.letterhoops.com/wp-content/plugins/events-manager/templates/forms/event/when.php //Used for date modification so only using one field instead of a range
/home2/letterhoops/wp.letterhoops.com/wp-content/plugins/events-manager/templates/forms/event/group.php //Used to update messaging under group selection
//User ID and Friend Ids functions
$uid = get_current_user_id();
$friends_list = friends_get_friend_user_ids( $uid, false, true );
//Button for inviting friends to an event/game
<button class='btn-success btn' onclick="invite_friends('$userId');" style="margin-top:5px;"><h3 class='small white'>Invite</h3></button>