Forum Replies Created
-
I do not understand, what exactly is happening, should you be more clear?
Try to use twentytwelve theme and just add there snippets. See what happen. What is your theme?
Thank you.
For all private social network, but login and register page is available to access.
add_action( 'template_redirect', 'redirect_to_login_page_for_premium_members' ); function redirect_to_login_page_for_premium_members() { if( (!is_page_template("loginpage.php")) && (!is_user_logged_in()) && (!is_page("Register") )) { $page = get_page_by_title( 'Login' ); wp_redirect(get_permalink($page->ID)); exit(); } }
Restrict buddypress components just for logged-in users:
*UNTESTEDadd_action( 'template_redirect', 'redirect_to_login_page_for_premium_members' ); function redirect_to_login_page_for_premium_members() { if( (is_buddypress()) && (!is_user_logged_in()) ) { $page = get_page_by_title( 'Login' ); wp_redirect(get_permalink($page->ID)); exit(); } }
functions.php
in post form we need to customize budypress.js because after sumbmision it generate textarea. Any idea how?
I believe we should write a ticket, because, it would be nice to get id if the item.
I think I should solve problem if you implement this patch into next release:
https://buddypress.trac.wordpress.org/attachment/ticket/5202/5202.02.patch
https://buddypress.trac.wordpress.org/ticket/5202How to customize “profile/change-avatar/” page?
I have used “index-action-change-avatar.php” template, but javascript is not loaded and you can not crop image by your needs. I have copied all the content from /profile/change-avatar.php default buddypress template directory.
Thank you.
I just love to be part of the community 🙂
I copy it into bp-custom.php:
Fatal error: Call to undefined function xprofile_set_field_data() in bp-custom.phpIn my functions.php I used action, still do not work:
function oi_bp_actions_and_filters() { xprofile_set_field_data('user_status', 39, 'spam'); add_action('bp_init', 'oi_bp_actions_and_filters');
Paste “add_action statement” also to the same place within your <?php ?> tags, otherwise it will no work.
Directory: wp-content/plugins/bp-custom.php
Paste there this code, everything, just like it is:
function bp_change_default_profile_sub_nav() { if ( bp_is_user_settings() ) { global $bp; $args = array( 'parent_slug' => $bp->settings->slug, // Slug of the parent 'subnav_slug' => 'profile', // The slug of the subnav item to select when clicked ); bp_core_new_nav_default($args); } } // Change default sub navigation of profile settings main tab navigation add_action( 'bp_setup_nav', 'bp_change_default_profile_sub_nav', 5);
You can share your nice website, if you like 🙂
Your thinking is on the right way. 🙂
Go to plugins directory and create file: bp-custom.php and the whole code just paste there and wrap it all by php tags:
<?php ?>
The latest BP and WP, and thanks to maintainers for updating codex. Pretty sweet.
This works for me: codex
Solved:
Define $group_id = NULL in the functions where errors appear, like this:function settings_screen( $group_id = NULL ) function settings_screen_save( $group_id = NULL ) function create_screen( $group_id = NULL )
I did, I palced the code into function display(), but without luck. Still Same Error.
[Edited – please use pastebin or gist to share large chunks of code. ]
You welcome.
Solved:
<?php // Enable Shortcodes for Side-wide Activity Stream function oi_add_shortcodes_to_activity_stream() { add_filter( 'bp_get_activity_content_body', 'do_shortcode', 1 ); } add_action('bp_init', 'oi_add_shortcodes_to_activity_stream'); ?>