Search Results for 'wordpress'
-
Search Results
-
Topic: Age Field two fields
Hi,
I have a WordPress page with the theme SweetDate, which also runs BuddyPress.
In BuddyPress there is the possibility to display the age instead of the birthday, unfortunately only for one field (man’s birthday), but now I have two birthdays (man and woman) and would like both to display the age.Greetings
moddeI’ve been using bp_notifications_add_notification to add a notification with “component_action”=”activity_liked” for component_name activity. I can see that it is being saved in the database, but when I try to display an entry for it in the notifications view it seems that my callback function never runs. Every example I’ve found online has mirrored my function but it never seems to be called. Do I need to register the component_action or something?
I’ve looked in the buddypress core files and they all seem to pass 8 parameters instead of 5 during apply_filters_ref_array, which I also tried but still my callback wouldn’t run. I’ve tried it every way with no other plugins but buddypress activated and still it fails.
I’m truly lost on how to get this working.
function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { // New custom notifications if ( $action == 'activity_liked') { $custom_title = 'activity liked'; $custom_link = '/activity/' . $item_id . '/'; $custom_text = bp_core_get_user_displayname( $secondary_item_id ) . ' liked your activity'; // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link ); // Deprecated BuddyBar } else { $return = apply_filters( 'custom_filter', array( 'text' => $custom_text, 'link' => $custom_link ), $custom_link, (int) $total_items, $custom_text, $custom_title ); } } else { $return = $action; } return $return; } add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 10, 5 );When I go to my notifications in my profile, I click on a notification. But then it just takes me to the main support page with the list of topics.
It doesn’t take me to the topic I received a notification about…
Also, is it possible to get the same kind of dropdown I see in the bbPress and WordPress support forums, with links to:
Topics Started
Replied Created
etc
etcIt would be really helpful to be able to link to those areas.
Thanks
Fresh install of WP at http://facets.expert. Tried to install BP plugin, then activate. Received message referred to in below thread, then site died. Just gone. There are a dozen similar reports on Google search, so I am surprised there is no mention on this forum. I am going to reinstall WP, but would appreciate any advice.
I’ve been wandering around in BuddyPress and WordPress.
I’ve been slowly working out how to get data out of WordPress.
But I CANNOT figure out how to get data out of Buddypress.
In this page:
There is some code that indicates how to get data back.
But no matter how I do it, I can’t get it to return any data.
I’m running the code in the middle of a WordPress page using a PHP plugin, rather than trying to create a page from scratch.
I’ve got it returning WordPress user data fine.
But getting any actual xProfile field data out is proving…. impossible.
I’m sure I’m ignorant of something really basic about how it all works…
Thanks for any help and pointing at relevant webpages.
I’m trying to set some code that copies the data from a new user across to xProfile fields.
But I’m wondering when that field creation triggers…
SO that I can insert the function into the correct location using add_action
I’m hoping that by the time WordPress gets to the ‘user_register’ function, and the actions being added, that the xProfile fields have been created…??
1) I am setting up BP and for some reason, the Activity stream shows to logged out users. In the Appearance/Menu setting, I added the Activity page from the BP drop-down list to show to logged in users. What did I miss to make the activity stream accessible only to members?
2) Is there a way to change the login page for members? I’d prefer the default WP login page not show. I’m using Divi by the way… can I use it instead?
So I’m having a really frustrating time getting BuddyPress to show all groups and fields, even if they have no data in them.
I found this page:
It talks about the bp_group_has_profile() function. And parameters that can be applied. BUT that function is NOT in the example code on that page.
I tried applying some of that information to
public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php
But bp_group_has_profile does not exist in the above file.
How does this information apply to showing all the fields and Profile Groups?
When I search for the individual functions (like bp_profile_group_has_fields) in the BuddyPress site, they don’t seem to exist…
Are these standard functions?
I’m very confused about how to make this work.
I also found this page:
But that involves removing bits, rather than using function calls… Is this the way to do it?
Thanks for any insight
Hello Everyone,
What I am looking to do seems so simple. If there is no solution, I will accept that but I wanted to make one final attempt to seek help on this forum.
Goal #1 – I want the buddypress “favorite” button in the activity stream to create an update in the “buddypressmain activity stream” when clicked.
Example: User Just Favorited A Photo (This shows in the member stream but I want it displayed in the main activity)
Goal #2 – I want the favorite button in wordpress post, which when clicked creates the following activity –
http:/testsite.com/post-123/#activity-1955
I would like to create an activity in the main buddypress stream to display favorited post.I would like to accomplish this without a plugin. If anyone has info or can direct me to info I am thankful!
Thanks!
WordPress 4.9.5 -> BuddyPress 2.9.4 -> Agama Blue Child Theme
I ended up with the below code from posts in these forums but it doesn’t do quite what I need it to do.
Users should not be able to see other users’ friends so the Friends tab when viewing another user’s profile page must be removed along with the functionality. Here’s my code:function bpfr_hide_tabs() { if ( !is_super_admin() && !bp_is_my_profile() ) { bp_core_remove_subnav_item( 'profile', 'friends' ); // This does nothing //bp_core_remove_nav_item( 'friends' ); //Or this but this also hides the Friends main menu item, not just the Friends tab in the user's profile page } } add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );I’ve switched between both options in the code.
bp_core_remove_subnav_item( 'profile', 'friends' );doesn’t really do anything andbp_core_remove_nav_item( 'friends' );does remove the Friends tab from another user’s profile but it also removes it from the main menu which is a different thing. The main menu Friends link points to my own Friends whereas the Friends tab in another user’s profile points to their friends. Any help would be appreciated.