Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Limit Amount of blogs a user can register


John James Jacoby
Keymaster

@johnjamesjacoby

I would do this by going into /member-themes/buddypress-member/blogs/create.php and doing…

<?php if ( bp_blog_signup_enabled() ) : ?>
<?php
global $bp;
$blogs = bp_blogs_get_blogs_for_user($bp->loggedin_user->id);
if ($blogs['count'] != 9)
{
bp_show_blog_signup_form();
}
else
{
?>
<div id="message" class="info">
<?php _e( 'Limit nine blogs per member. If you would like another, please contact an Admin for assistance.', 'buddypress' ); ?>

</div>
<?php
}
?>

<?php else: ?>

<div id="message" class="info">
<?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?>

</div>

<?php endif; ?>

Just remember not to overwrite the member theme if you do a BuddyPress update. ;)

Skip to toolbar