-
Henry Wright replied to the topic Change "Name" Field to First & Last Name in the forum Creating & Extending 7 years, 8 months ago
There sure is: xprofile_field_after_save
Let me know if you need anything else.
-
Henry Wright updated the bp_core_get_userlink() page, on the BuddyPress Codex 7 years, 8 months ago
Description
Returns a HTML formatted link for a user with the user’s full name as the link text.Top
UsageTop
Parameters
$user_id
(integer) User ID to check.$no_anchor
(bool) Disable URL and […] -
Henry Wright replied to the topic Change "Name" Field to First & Last Name in the forum Creating & Extending 7 years, 8 months ago
The problem with bp_core_signup_user is it’s executed during registration only. If a member decides to change their “Name” at a later date, I don’t think the corresponding WordPress fields will be updated.
-
Henry Wright replied to the topic Change "Name" Field to First & Last Name in the forum Creating & Extending 7 years, 8 months ago
Thanks for the reply, so you’re saying I should rename this field to “First Name” and create a secondary field for “Last Name” ?
That’s one approach you could take.
If there is nothing special about the field, is there a hook or filter where I can replace the field entirely and map them to first / last name fields in WordPress?
I think not…[Read more]
-
Henry Wright replied to the topic Change "Name" Field to First & Last Name in the forum Creating & Extending 7 years, 8 months ago
There isn’t anything special about the “Name” field aside from it being required. You could treat the field as the member’s first name and set up a second field labelled “Surname”?
-
Henry Wright's profile was updated 7 years, 8 months ago
-
Henry Wright replied to the topic Is it profile or members conditional tags? in the forum How-to & Troubleshooting 7 years, 8 months ago
I’ve just removed
bp_is_member()
from the Template Tag Reference so there’s no confusion going forward: -
Henry Wright updated the Template Tag Reference page, on the BuddyPress Codex 7 years, 8 months ago
This page is currently undergoing review and updating. References marked with ? have been reviewed for current accuracy.
General Template Tags
bp_get_loggedin_user_nav()Uses the $bp->bp_nav global to render […] -
Henry Wright replied to the topic Change confirmation emails from wordpress@yourdomain.com in the forum How-to & Troubleshooting 7 years, 8 months ago
Often you’ll also want to change the from “name”. That can be done with:
add_filter( 'wp_mail_from_name', function( $name ) {
return 'Jam Session';
} ); -
Henry Wright replied to the topic Change confirmation emails from wordpress@yourdomain.com in the forum How-to & Troubleshooting 7 years, 8 months ago
Try the wp_mail_from filter:
add_filter( 'wp_mail_from', function( $email ) {
return 'admin@jamsession.dk';
} ); -
Henry Wright replied to the topic Problem when i upload avatar in registration page. in the forum Third Party Plugins 7 years, 8 months ago
No need to edit the core file. The
bp_attachments_current_user_can
filter can be used here.add_filter( 'bp_attachments_current_user_can', function( $can, $capability ) {
[Read more]
if ( 'edit_avatar' !== $capability ) {
return $can;
}
// This will let all users upload an avatar (not just logged in members).
$can =… -
Henry Wright replied to the topic Activity Custom Content After Post Iteration in the forum How-to & Troubleshooting 7 years, 8 months ago
How do I do that on the server side?
You’d use the modulo operator, like in my example above.
Did this work for you?
-
Henry Wright replied to the topic Activity Custom Content After Post Iteration in the forum How-to & Troubleshooting 7 years, 8 months ago
Ah, the “load more”. I forgot about that. In order to load your items (and activities) you’ll need to make an ajax request. In your server side processing script you can use the modulo operator to insert your items at every 5th iteration.
-
Henry Wright replied to the topic Activity Custom Content After Post Iteration in the forum How-to & Troubleshooting 7 years, 8 months ago
I’ve used Pastebin because there’s quite a lot of code to paste here. Notice my amendments on lines 34, 36, 37, 38 and 58.
Let me know if it works for you.
-
Henry Wright replied to the topic Activity Custom Content After Post Iteration in the forum How-to & Troubleshooting 7 years, 8 months ago
You’ll need to replace
// Loop start
and// Loop end
with your actual loop. If you want to paste your loop here I’ll try to take a look -
Henry Wright replied to the topic Activity Custom Content After Post Iteration in the forum How-to & Troubleshooting 7 years, 8 months ago
You can use the modulo arithmetic operator. Here’s an example:
$counter = 1;
// Loop start
if ( 0 === $counter % 5 ) {
// Do something here.
}
$counter++
// Loop end -
Henry Wright replied to the topic Static page to Dynamic in the forum How-to & Troubleshooting 7 years, 8 months ago
You use
bp_core_new_nav_item()
. See this article for more info: -
Henry Wright replied to the topic Buddypress Technical Issues in the forum How-to & Troubleshooting 7 years, 8 months ago
Try doing the same thing using a different theme to see if your theme is causing the issue.
-
Henry Wright replied to the topic retrieving xprofile fields during registration validation in the forum Creating & Extending 7 years, 8 months ago
It just feels like that should be part of a passed or available object rather than the raw $_POST so it’s gone through any form validations
At the point
bp_signup_validate
executes we’re still very early on in the process (still validating the data). Setting object properties or saving to the database only happens after the validation checks. -
Henry Wright replied to the topic retrieving xprofile fields during registration validation in the forum Creating & Extending 7 years, 8 months ago
The $_POST variable should have what you need.
- Load More
@henrywright
Active 8 months, 1 week ago