Skip to content

Instantly share code, notes, and snippets.

@BoweFrankema
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoweFrankema/e95ec775f3ba0db92182 to your computer and use it in GitHub Desktop.
Save BoweFrankema/e95ec775f3ba0db92182 to your computer and use it in GitHub Desktop.
See full post on BP-Tricks.com for full instructions http://wp.me/p2ZyW5-Jr
<?php
function bp_tricks_member_intro_text() { { ?>
<script type='text/javascript'>
jQuery( document ).ready(function() {
// Member Directory Message
if (!jQuery.cookie('member-alert-message')) {
jQuery( "#member-welcome-message" ).show();
jQuery("#expand-hidden").click(function() {
jQuery( "#member-welcome-message" ).slideUp( "slow" );
// set the cookie for 24 hours
var date = new Date();
date.setTime(date.getTime() + 1024 * 60 * 60 * 1000);
jQuery.cookie('member-alert-message', true, { expires: date });
});
}
});
</script>
<div id="member-welcome-message" class="intro-text">
<div id="expand-hidden"><a href="#"><i class="fa fa-times"></i> Hide this Message</a></div>
Hi! Welcome to our Member Directory! You can use our awesome search options to quickly find people in similar situations as you. Click on the "Show Search" buttons to see all the available search options! Have fun and make some new friend!
</div>
<?php }}
add_action('bp_before_directory_members_tabs','bp_tricks_member_intro_text', 1);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment