Skip to:
Content
Pages
Categories
Search
Top
Bottom

add notifications and "Whats New" text to home page

  • Hi

    Busy setting up a Buddypress site for a client and I need to put the Login area in the content area on the home page (no sidebar). The problem is that the login form fills the assigned div but once logged on the avatar, name and “logout” button don’t. This leaves a big white hole.

    Is it possible to display a summary / list of notifications (or the “no new notifications” text) as well as the “whats new” text (or the update text box), when logged in under the avatar, name and logout button?

    If you could respond with a how to or direct me to a how to with the php code I would need to put in my theme.

    Thanks

    Jon

Viewing 2 replies - 1 through 2 (of 2 total)
  • why not use the bp-notifications widget plugin and create a widget area where you would like in your template..

    check your code for the login form because iv tried this and it goes once a user is logged in..

    try this:

    <?php if (!is_user_logged_in() ) { //only non-logged in user can view this ?>

    <form name=”login-form” id=”login-form” class=”standard-form” action=”<?php echo site_url( ‘wp-login.php’, ‘login’ ) ?>” method=”post”>

    <div style=”font-weight:bold; margin-left: 20px; margin-bottom: 10px;”><label>

    <input type=”text” name=”log” id=”userbar_user_login” class=”input” value=”<?php echo attribute_escape(stripslashes($user_login)); ?>” /></label></div>

    <label><?php _e( ‘Password’, ‘buddypress’ ) ?>

    <input type=”password” name=”pwd” id=”userbar_user_pass” class=”input” value=”” /></label>

    <p class=”forgetmenot”><label ><input name=”rememberme” type=”checkbox” id=”userbar_rememberme” value=”forever” /> <?php _e( ‘Remember Me’, ‘buddypress’ ) ?></label></p>

    <input type=”submit” title=”Login” name=”wp-submit” id=”userbar_wp-submit” value=”<?php _e(‘Login’); ?>” tabindex=”100″ />

    <input type=”hidden” name=”redirect_to” value=”<?php bp_root_domain() ?>” />

    <input type=”hidden” name=”testcookie” value=”1″ />

    </form>

    <?php } ?>

    for the whats new text u can try,

    <?php if (is_user_logged_in() ) { //only logged in user can view this ?>

    //place content here

    <?php } ?>

    u can use that to show something only to logged in users and:

    <?php if (!is_user_logged_in() ) { //only non-logged in user can view this ?>

    //place content here

    <?php } ?>

    to show something only to users who are not logged in

    if u are using a text widget try use the widget logic plugin also

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.