Forum Replies Created
-
In reply to: don't want registration page to show after login
OK here is my revised first function (which works now). It will target a specific menu of your choosing. Just replace CHANGE-THIS with the name of the menu you want to target.
function custom_menu_item ( $items, $args ) { if ( !is_user_logged_in() && $args->menu == 'CHANGE-THIS' ) { $items .= '<li><a href="/register" title="Register">Register</a></li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'custom_menu_item', 10, 2 );In reply to: don't want registration page to show after login@benjino the whole menu is filtered so you can build as much of it or as little of it as desired.
Take the portion of my code that builds the link:
<li><a href="/register" title="Register">Register</a></li>Changing this to
<li><a href="/link-before" title="Link before">Link before</a></li> <li> <a href="/register" title="Register">Register</a> <ul> <li><a href="/sub-item" title="Sub item">Sub item</a></li> </ul> </li> <li><a href="/link-after" title="Link after">Link after</a></li>will allow you to output a highly customised menu.
As @hnla said, if you’re using my second function, then this will be applied to all WP menus you have set up.
In reply to: Changing the avatar size on the Members pageYou said my solution to remove the
bp_member_avatarfunction in members-loop.php and replace it with<?php bp_member_avatar( 'type=thumb&height=30&width=30' ); ?>didn’t work?i wanted to know the exact code you are replacing in that file.
In reply to: don't want registration page to show after login@hnla Yes, spot on. The first function i wrote in a rush, i tired to target a specific menu but when i tried testing the function it didn’t work as expected. Although my second function will work, you’re right it will spit out the register link to all WP menus that are in operation
In reply to: Changing the avatar size on the Members pageHumm.. can you post the exact code you’re removing from members-loop.php?
In reply to: don't want registration page to show after loginShould have tested my function first as it didn’t work. This one i’ve tested and it does work:
function custom_menu_item ( $items ) { if ( !is_user_logged_in() ) { $items .= '<li><a href="/register" title="Register">Register</a></li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'custom_menu_item' );In reply to: don't want registration page to show after loginYou can do this by making use of the
wp_nav_menu_itemshook to add the register link for logged-out users only. Put this in your functions.php:function custom_menu_item ( $items, $args ) { if ( !is_user_logged_in() && $args->theme_location == 'INSERT-MENU-LOCATION-HERE' ) { $items .= '<li><a href="/register" title="Register">Register</a></li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'custom_menu_item', 10, 2 );In reply to: Template hierarchy Codex page…and of course everyone else involved in the project.
In reply to: Template hierarchy Codex pageIn reply to: How can I get the activity like facebooks?@bphelp nice!
In reply to: Login or Register – CustomizeIn the old bp-default way of doing things, the registration page can be found at /registration/register.php
Once you upgrade to 1.8 (not available yet), the registration page will be available via the template /buddypress/members/index-register.php
With reference to the login page, perhaps someone else can help as I just use a widget
In reply to: How can I get the activity like facebooks?@bphelp just took a look at your plugin, great attempt at activity privacy. Does it allow personal AND friend’s activity to appear in the same feed?
In reply to: Member list displaying twiceIt isn’t displaying twice for me. I used Chrome to access just now and the list looks fine.
In reply to: Filtering questionSeem to have got the bugger working by adding the following to the function:
global $field; $options = $field->get_children();and passing the proper number of variables to the function:
function edit_profile_radio($test, $options, $field, $selected, $k)and
add_filter( 'bp_get_the_profile_field_options_radio', 'edit_profile_radio', 10, 5 );In reply to: One Activity Stream ( Personal, Mentions, Friends )It isn’t currently possible to have personal AND friend’s activity in the same activity feed. I have raised a ticket (#4988) but until then if you somehow find a way then please post here
In reply to: Changing the avatar size on the Members pagebp-core-widgets.php is a core file, you should try to avoid editing core files if possible.
Open members/member-loop.php and change the
bp_member_avatarfunction to<?php bp_member_avatar( 'type=thumb&height=30&width=30' ); ?>In reply to: setting the profile page as main pageadd this line to your bp-custom.php file
define( 'BP_DEFAULT_COMPONENT', 'profile' );In reply to: Dynamic profile fields@hnla i’ve made a start but have to pop out for a while. You can see where i’ve got to so far
In reply to: Dynamic profile fieldsLoving the second approach! although not as clean as the first approach, it’ll be much easier to do. jQuery show, hide and toggle could all be used to get the desired effect! i’m going to have a crack at it this weekend…
<?php if ( is_user_logged_in() ) { ?> <a href="/<?php echo bp_core_get_username( bp_loggedin_user_id() ); ?>" title="Profile"><img src="logo.png" alt="Logo" /></a> <?php } else { ?> <a href="/" title="Home"><img src="logo.png" alt="Logo" /></a> <?php } ?>In reply to: Restration Page Re-directs to HomepageWhat @bphelp said and also try going to WP Admin > BuddyPress > Pages and then under Registration make sure your “Register” page isn’t set to your homepage.
@newkindofcool thanks for the update, always good to hear the solution when one comes along!
In reply to: Dynamic profile fieldsbump
In reply to: Exclude self from members directoryI ended up using
if ( bp_get_member_user_id() == bp_loggedin_user_id() ) continue;right afterbp_the_member()in members-loop.php. I borrowed the idea from an old post by @r-a-yThe only drawback with this approach is the numbers in the pagination will be off by 1.
So even though the pagination might read “Showing 1 – 5 of 5 members”, you will see just 4 members on the page (the 5th member is the current user who we’ve just excluded).
In reply to: Exclude self from members directoryThanks @ aces seems like an interesting plugin. I’ll check it out