Forum Replies Created
-
Child theme overloads are only for template files.
Modifying core files is not a good idea – but in this case it is the only option.
And the next release will include the patch – so your changes are just a temporary kludge.In reply to: Showing + Filtering GroupsTry
$loop['include'] = '-1';In reply to: Query works in phpMyAdmin but not through BP$wpdb->get_colreturns an array.
Why are you setting the results to an array?
$my_matches = array($wpdb->get_col ...>The problem is that $my_matches returns nothing. i.e. echo $my_matches[0] outputs Array.
An array is being returned, that is different than returning ‘nothing’.
Usevar_dump( $my_matches )to examine both the structure and the contents of the results.In reply to: custom xprofile field with optionsDo you have a validation function in your class?
Something like:public function is_valid( $values ) { $this->validation_whitelist = null; return parent::is_valid($values); }For a fairly simple example of adding a custom xprofile field, see BP xProfile Location
( yes, I know it does not yet reflect the recent changes to the Google API, but it should pass validation for your purposes )$wpdb->get_colreturns an array
$wpdb->get_varreturns a single value – try itWhen not using a BP profile loop, try using xprofile_get_field_data.
In reply to: Custom fields in Member Display Page>I’m not sure what hooks are
Look for that text in your theme’s member-loop template.
>and I don’t know where bp-custom.php is.
I provided a link to the documentation in my reply.
In reply to: Custom fields in Member Display PageIf that theme has not removed the
bp_directory_members_itemhook from the members-loop template, then you could use this function in bp-custom.phpAssuming you have a profile field named ‘Title’ …
function acie_show_member_data() { $title = bp_get_member_profile_data( 'field=Title' ); if ( $title != '' ) { $str = $title . '<br>'; echo $str; } } add_action( 'bp_directory_members_item', 'acie_show_member_data' );In reply to: Hiding the admin userYou could use the overload method.
imo, using hooks is easier.For example, to hide admin users from the members loop, you could put this into bp-custom.php… untested…
function grw_members_loop_ghosts( $retval ) { if ( bp_is_members_directory() ) { $admins = get_users( array( 'fields' => 'ID', 'role' => 'administrator', )); $admins = implode(',', $admins ); $retval['exclude'] = $admins; } return $retval; } add_filter( 'bp_before_has_members_parse_args', 'grw_members_loop_ghosts' );In reply to: Member loopThe members loop template is here:
buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.php>How to delete activities before a date
The first and simplest step is to use one of the registration captcha plugins from the repo.
In reply to: Users on list without first loginIn reply to: I Can’t Download BuddyPressYou can download it.
Your problem is installing it.
Your xampp installation is timing out.Look thru the xampp documentation for instructions on how to increase the php maximum execution time.
You cannot put
phpcode into the Additional CSS area.You will not be able to integrate that plugin until you or somebody else can create / edit files on your site.
In reply to: Display groups of connected memberbp_displayed_user_id()only works on a profile page – the displayed user.Try using
bp_loggedin_user_id()In reply to: Empty pages – Appointment ThemeFor theme specific support, please contact the theme creators.
And then post their response here.
In reply to: Course Group ErrorI believe those warnings are related to fetching the plural form of a number.
Do you have debug turned on in
wp-config.php?
If the only issue is the Warnings, turning off debug should make them disappear.If they still appear or there are related issues, you should open a ticket at LearnDash.
But first, to see if the issue is related to your theme, try switching momentarily to a WP theme like 2016 and see if the warnings persist.
In reply to: Display groups of connected memberYou need to clarify your question.
You want a link to go to ‘My Groups’ – does that mean the Groups page on their profile that shows all the Groups they belong to?
Or a link that goes directly to a single Group ? Assuming they only belong to one group.
Or… ?
You may want to share your header code by using gist and then posting the link here.
That way we can see the exact context.In reply to: BuddyPress email problemPlease follow the link I provided above. It explains everything you need to know.
In reply to: BuddyPress email problemYou can prevent auto-links in the profile areas.
You need to create a file called bp-custom.php and then add this function to it:
function remove_xprofile_links() { remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 ); } add_action( 'bp_init', 'remove_xprofile_links' );In reply to: Can’t read forum postsThese are the BuddyPress forums.
The bbPress forums are on another site.In reply to: user description in member list (fixed)Create a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\members-loop.phpAnd place your code wherever you want in the overload.
bp_displayed_user_id()is incorrect in the context of the members loop.
Instead:$user_meta = get_userdata(bp_get_member_user_id()); echo($user_meta->description);Or instead of an overload, use this hook:
do_action( 'bp_directory_members_item' );In reply to: Formatting members areaYour theme is causing those issues. They also exist on the login page.
To confirm, try switching momentarily to a WP theme like 2016 and see if the issues persist.You will need to contact the theme creator to get answers re your formatting issues.
Or you will need to learn how to use css.In reply to: Add “back to forums” link to Member Profile pagesYou could edit a template.
If you are using profile cover images, editbuddypress\members\single\cover-image-header.php
Otherwise, editbuddypress\members\single\member-header.phpBut you can use a function instead.
Both the templates mentioned above have two action hooks:do_action( 'bp_member_header_actions' ); do_action( 'bp_profile_header_meta' );Choose the one that will place your button where you want it and write a function that adds the button.