How to add pagination to a post loop in a custom BuddyPress tab

I created a new tab called "Videos" inside of the BuddyPress Profile page. This tab contains all video posts added by that user. The problem is that it only shows the first 12 posts and the pagination does not show up. I did try to include the pagination code provided by the theme but to no avail. Notes: I am using a theme called "VideoTube" The post loop to be paginated is from a custom post type called "video" The …
Category: Web

Buddypress dynamic profile field

Is there a way or a plugin to make Buddypress user profile dynamic? For example there's a field called contact number. The user should be able to dynamically add multiple contact numbers by clicking "Add contact number" button. Here's an example from wordpress.com Thank you.
Category: Web

validation email signup form buddypress

I try to customise the standard email validation error text from the signup form. So I have a child theme and I have a functions.php file. There is a file bp-members-functions.php in buddyboss. with this function: function bp_core_add_validation_error_messages( WP_Error $errors, $validation_results ) { if ( ! empty( $validation_results['invalid'] ) ) { $errors->add( 'user_email', __( 'Please sdfsdfsdfr a valid email address.', 'buddyboss' ) ); } if ( ! empty( $validation_results['domain_banned'] ) ) { $errors->add( 'user_email', __( 'Sorry, that email address is …
Category: Web

How can I combine Wordpress default Tags and bbPress tags into one archive page?

I'm trying to figure out how to combine two taxonomies? I've got three things going on: Tags from Buddyboss's Forums (Buddypress/bbpress) Tags from The Events Calendar Pro Tags from Wordpress's WP_TAGS The events calendar uses the standard WP_TAGS that Wordpress blog posts also use, but the forums have their own tag type. I'd like to combine the tags so that clicking the same word takes you to one page, with forum discussions, blog posts, and events related to that tag. …
Category: Web

Set default landing page for buddypress member profile

I've been trying to redirect users to the profile page when accessing profiles of users and self. Currently it's redirecting to activity page by default. Eg: example.com/members/username is showing the activity page as default. I've tried setting the below line in wp-config.php as suggested in Buddypress forum. But doesn't seem to be working. define('BP_DEFAULT_COMPONENT', 'profile'); Is there any workaround to implement this, instead of profile all the other links(friends, groups, notifications etc.) are working when setting in BP_DEFAULT_COMPONENT.
Category: Web

custom login page redirect to logged in user profile page

If I click on sign in then it should go to the login page. The issue is that when I put the link then it goes to redirect_to home page, but I want to go on user profile page instead. I don't want to use a plugin to redirect to profile page after login. I have code for user profile - <a href="<?php echo bp_loggedin_user_domain(); ?>/profile/edit/"><span>My Profile</span></a> And i want to put this link into <input type="hidden" name="redirect_to" value="<?php echo …
Category: Web

switch_to_blog( ) content disappears after load

I'm working on building a custom extension to BuddyBoss that adds a tab to the user's profile to view that particular user's wishlist. When the page initially loads the correct data is being pulled in by the code but after 1-2 seconds the content that was pulled in from the shortcode disappears and shows no tractors in the user's wishlist. Is there a way to get this to stop? I am using a multi-site WordPress setup and the Favorites list …
Category: Web

wp_delete_user - huge overhead in Buddypress?

I am running a Buddypress Website with 8k Users and I want to create a fresh installation as a base for a new project. I do not want to touch the DB directly because I feel it's dirty and could potentially create conflicts - hence I wanted to clean all users except the administrators just once. Running wp_delete_user takes ages on a managed cloud server - basically my scripts are timing out after 5minutes with just 300 users deleted. Is …
Category: Web

Adding a location field to buddypress activity

I am trying to figure out a way for adding location to buddypress activity. I tried using "Geo my WP" plugin to add location to a custom post type but the problem is that activity is not a custom post type. I couldn't add a custom field to it I’m very basic with code so if someone can help me with how I can add a custom field to activities and have it get the location information from any 3rd …
Category: Web

Wordpress Buddypress changes groups position

I set up a website in using Wordpress Buddypress, a social site has 9 groups, I want to change the groups position in a good order, but I didn't find any way to do that. Please tell me how to do if some one know. thank you so much !
Category: Web

How to customize BuddyBoss Theme page header

Using the BuddyBoss Theme (and platform), there are 3 header/navigation style options available. How can I add a home page (front page) with custom header just for that one page; for example to change the height and color for just that page? A more complex example might be to add a splash screen to the home page. Do I need to use the child theme approach, copy the buddyboss-theme\header.php file to the child theme and then modify file buddyboss-theme-child\header.php? In …
Category: Web

Easiest way to find JS conflicts

What is the best / easiest way to find JS conflicts? I have a subpage where I load jQuery OwlCarousel which works fine, but sometimes does not set the active item correctly. So I suppose there is a conflict with some other jQuery UI / drag/drop Plugin or similarly, hence may owlCarousel does sometimes not properly catch the relevant event(s) (in this case the drag/drop event) to set the active css class. I mean I could potentially unregister ALL scripts …
Category: Web

Redirecting non-logged in users trying to view Group pages but not the Group directory

We are looking to redirect all Groups pages (but not the Groups directory page /groups/) in BuddyPress for non-logged in users to the /register/ page. We are currently using this snippet for member profiles in our functions.php file: /*** Redirect non logged-in users to registration page if they visit a profile page ***/ function gwangi_bp_logged_out_page_template_redirect() { if( ! is_user_logged_in() && bp_is_user() ) { wp_redirect( home_url( '/register/' ) ); exit(); } } add_action( 'template_redirect', 'gwangi_bp_logged_out_page_template_redirect' ); Is there a way this …
Category: Web

BuddyBoss (BuddyPress / bbPress) moderation filters not doing anything

I'm trying to prevent moderation of forum posts for users with the 'moderate' capability OR an active 'premium' membership plan (WC Memberships). I want replies from such authors to not be subject to our moderation rules (number of links, blocklisted words, etc.). I've tried using the following filters with no luck: add_filter( 'bbp_bypass_check_for_moderation', 'bbp_bypass_if_user_can_moderate', 10, 4 ); function bbp_bypass_if_user_can_moderate( $anonymous_data, $author_id, $title, $content ){ if( user_can( $author_id, 'moderate' ) || wc_memberships_is_user_active_member( $author_id, 'premium' ) ){ return true; } else { …
Category: Web

how to add submit biodata button under BuddyPress edit profile save button?

I'm going to create a public profile directory website using BuddyPress. Users will register, then complete their profile, admin will check the information and manually approve them for the directory listing. But the problem is, I don't want to waste my time checking incomplete profiles, also I don't know when they will complete their profile, today or a few weeks later. So I need a submit biodata button under BuddyPress save button. after filling the required fields, the user will …
Category: Web

How do I update an XProfile “checkbox” type field via BuddyPress API?

I’m working on a mobile app to interface with a BuddyPress 9.0.0 website via the BP API. The website has some xprofile parent fields of the “checkbox” type, each with a set of “options” which the user can set to be true or false. For example, there is a parent called “Pets” under which the user can select one or more of the specified check boxes such as “Dog”, “Cat”, “Cow”, etc. I am having trouble trying to update this …
Category: Web

How to display text if profile fields are not filled?

How to display any text/content if all buddypress user profile fields are not filled? Here is my code which retrieves field data if the field is filled by the user: $fields = array('Field 1', 'Field 2', 'Field 3', 'Field 4', 'Field 5'); foreach ( $fields as $field) { $data = xprofile_get_field_data($field); if ($data) { echo '<div class="">'. $field .' - '. $data .'</div>'; } } // How to display here information if all 5 fields are not filled by user?
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.