Search Results for 'wordpress'
-
Search Results
-
Topic: Post On Buddypress Profile
I wish the developers/contributors would add a post on profile button to show user posts in the next update. It makes sense to have this function as it incorporates WordPress and Buddypress respectively. There is only one plugin that I found which accomplished this feet:
by Huseyin Berberoglu. The plugin is out of date and it takes tons of modifications to get it going with an up to date Buddypress install.
The second method is a block of code placed in functions.php
function importSomething(){ return include_once 'bp-custom.php'; } add_action( 'bp_setup_nav', 'buddyboss_child_bp_nav_adder' ); add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); function buddyboss_child_bp_nav_adder() { global $bp; $post_count = count_user_posts_by_type( $bp->displayed_user->id ); bp_core_new_nav_item( array( 'name' => sprintf( __( 'Posts <span>%d</span>', 'my-poems' ), $post_count ), 'slug' => 'Articles', 'position' => 250, 'show_for_displayed_user' => true, 'screen_function' => 'buddyboss_child_list', 'item_css_id' => 'articles', 'default_subnav_slug' => 'public' )); } function buddyboss_child_list() { add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } /*------- This is end of the code for above function ---------*/ function profile_buddyboss_child_loop() { $myposts = get_posts( array( 'posts_per_page' => -1, 'author' => bp_displayed_user_id(), 'post_type' => 'post' )); if( ! empty($myposts) ) { foreach($myposts as $post) { setup_postdata( $post ); if (has_post_thumbnail( $post->ID ) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'sidebar-smallthumbnew' ); else : $image[0] = "http://....com/wp-content/uploads/2015/10/userpost.jpg"; endif; echo '<li class="sidebar mostpop post-' . $post->ID . '"><span id="postimage"><a>ID) . '"><img src="' . $image[0] . '" /></a></span><div id="postinfo"><a>ID) . '">' . get_the_title($post->ID) . '</a></div></li>'; } echo '</ul>'; wp_reset_postdata(); } else { ?> <div class="info" id="message"> <p><strong><?php bp_displayed_user_fullname(); ?></strong> has No posts.</p> </div> <?php } } /* This is end of the code for above function */ remove_filter('bp_setup_nav',''); function count_user_posts_by_type( $userid, $post_type = 'post' ) { global $wpdb; $where = get_posts_by_author_sql( $post_type, true, $userid, true); $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" ); return apply_filters( 'get_usernumposts', $count, $userid ); }This works fine but it’s quite limited. It also messes with Buddypress updates rendering the two latest Buddypress updates useless (Star message, and Upload Background image).
Guys please get around to integrating this ability in Buddypress so one doesn’t have to spend hours searching and trouble shooting for a function which I believe and others should be an already main component.
Hi. I’m trying to change profile tabs position, so it should. I want it to change from this

To something like this
How do I do this? bp-custom.php doesn’t work for me. Still, as I understand, it would just change order of items. This was my code<?php define(‘BP_DEFAULT_COMPONENT’,’groups’); global $bp; $bp->bp_nav[‘Activity’][‘position’] = 30; $bp->bp_nav[‘profile’][‘position’] = 20; $bp->bp_nav[‘notifications’][‘position’] = 10; $bp->bp_nav[‘messages’][‘position’] = 80; $bp->bp_nav[‘friends’][‘position’] = 70; $bp->bp_nav[‘groups’][‘position’] = 60; $bp->bp_nav[‘media’][‘position’] = 50; $bp->bp_nav[‘settings’][‘position’] = 40; add_action( ‘bp_init’, ‘tricks_change_bp_tag_position’, 999 ); add_action( ‘wp_head’, ‘tricks_change_bp_tag_position’,9 ); ?>I’m, using latest BuddyPress and WordPress versions
Hello, Buddypress.
I am trying to add a new tab to my profile page seen here:

I am pretty familiar with WordPress and how everything works, but I am a bit slower when it comes to FTP. Can someone help explain to me how I can go about adding a new tab?
I want to put speak widgets inside this tab, such as woo commerce store orders, post bookmarks, things like that. But I’m clueless as to how.
Thank you for all your help in advance!
-Jeff Arnold
Hi
I have wordpress network and installed buddypress on the network. my network just has a subdomain. everything was working well but when I was changing some settings in another plugin, I suddenly noticed that my subdomain doesn’t open… so I enabled PHP errors and now I get this error:Warning: Creating default object from empty value in /domains/mysite.com/public_html/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php on line 258 Fatal error: Call to undefined method stdClass::save() in /domains/mysite.com/public_html/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php on line 275
Hi,
I’m using WordPress 4.3.1 and just updated Buddypress to 2.4. Since the update of Buddypress the profile fields can be overwritten by the members although I choose “enforce profile visibility” in the settings. Before the update everything worked. I just tried it with WP 2015 and the problem still exists.
My Website is http://community.midoggy.de
Thank you for your help,
JuliaGreetings…
I’ve inherited a development project that is using WordPress 3.7 along with BuddyPress 1.5. The intent being to upgrade both to current RC’s.
There is a lot of customized code dealing with xprofile fields and member search functions, with most being achieved by way of template overload in a child theme based on bp default. There are also modifications to the BP 1.5 core files that I am in the process of migrating over to BP 2.3.4. Due to relative unfamiliarity with BuddyPress, not exactly sure where that will lead. Realistically, about 50% of that code base has been migrated over without breaking the BP 2.3.4 install.
Backtracking a bit, it is my intent to update WordPress to 4.3.2 with the current BP 1.5. I have actually updated WordPress and corrected the BP slugs that were changed with the update. All except for the BP members slug which resolves correctly to …/profile/edit/group/1 but returns a 404 “page can’t be displayed error.”
I have found a few threads that deal with this issue but none of the proposed solutions seem to resolve. Some deal with plugin type conflicts and others deal with updating BuddyPress (which is not a viable option at the moment).
My bp-xprofile-screens.php includes some validations and can be viewed on pastebin…
http://pastebin.com/b13kAk2vI have the site migrated onto a development box at http://52.6.38.92/. For those savvy enough to provide some insight, temporary login credentials from DropBox at https://www.dropbox.com/sh/wt1wxd32duosb0j/AADSDSI81VOxUg89L_bqHddZa?dl=0.
It should be noted that if I do upgrade BuddyPress to 2.3.4 (both plugins are installed on the site), I am able to edit the profile at …/profile/edit/group/1, but that’s defeating my purpose as all the code has yet to be migrated (if that is even possible to achieve). And there are still display issues with my search form using BP 2.3.4.
I guess the relevant question is why would the “bp_core_redirect( bp_displayed_user_domain() . $bp->profile->slug . ‘/edit/group/1’ );” statement work with WordPress 3.7 and not with 4.3.2? What am I missing? Is something being overwritten in the database upgrade?
I’m hoping that someone more intimate than I am with BP can provide some additional insight.
I’ having this old but new issue. Old because I forget about it until there is a new Buddypress update, then I’m painfully reminded again.
I’ve been showing User Posts to the WordPress site on the Buddypress Activity page by using an awesome function I found in a Forum. It adds a Button to Buddypress Nav, titled (POSTS), with post count. These are all the posts that a user posted to the WordPress site. The problem I’m having is everytime Buddypress comes out with a new Update I have to pass on it because it interferes with the (Posts) Nav and Vice Versa. I do not want to keep losing out on these updates but I also do not want to lose the user Posts button on the activity page.
Here is the function I used, can anyone tell me how to fix this:/* ------------------------------Start BP Post in profile code for function-------------------- */ function importSomething(){ return include_once 'bp-custom.php'; } add_action( 'bp_setup_nav', 'buddyboss_child_bp_nav_adder' ); add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); function buddyboss_child_bp_nav_adder() { global $bp; $post_count = count_user_posts_by_type( $bp->displayed_user->id ); bp_core_new_nav_item( array( 'name' => sprintf( __( 'Posts <span>%d</span>', 'my-poems' ), $post_count ), 'slug' => 'Articles', 'position' => 250, 'show_for_displayed_user' => true, 'screen_function' => 'buddyboss_child_list', 'item_css_id' => 'articles', 'default_subnav_slug' => 'public' )); } function buddyboss_child_list() { add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } /*------- This is end of the code for above function ---------*/ function profile_buddyboss_child_loop() { $myposts = get_posts( array( 'posts_per_page' => -1, 'author' => bp_displayed_user_id(), 'post_type' => 'post' )); if( ! empty($myposts) ) { foreach($myposts as $post) { setup_postdata( $post ); if (has_post_thumbnail( $post->ID ) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'sidebar-smallthumbnew' ); else : $image[0] = "http:/...com/wp-content/uploads/2015/10/userpost.jpg"; endif; echo '<li class="sidebar mostpop post-' . $post->ID . '"><span id="postimage"><a href="' . get_permalink($post->ID) . '"><img src="' . $image[0] . '" /></a></span><div id="postinfo"><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></div></li>'; } echo '</ul>'; wp_reset_postdata(); } else { ?> <div class="info" id="message"> <p><strong><?php bp_displayed_user_fullname(); ?></strong> has No posts.</p> </div> <?php } } /* This is end of the code for above function */ remove_filter('bp_setup_nav',''); function count_user_posts_by_type( $userid, $post_type = 'post' ) { global $wpdb; $where = get_posts_by_author_sql( $post_type, true, $userid, true); $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" ); return apply_filters( 'get_usernumposts', $count, $userid ); } /* ------------------------------This is end of the code for post in profile above function-------------------- */


