Forum Replies Created
-
In reply to: Buttons + Tabs Loading Whole Site Into Template
Try:
function andrew_admin_access() { if ( is_admin() && ! is_super_admin() ) { wp_redirect( home_url() ); exit; } } add_action( 'wp', 'andrew_admin_access' );In reply to: Add new activity when using wp_create_user?Sorry, I was answering an oft-asked question re showing up in members loop.
You can add an activity item:
https://codex.buddypress.org/developer/function-examples/bp_activity_add/You could create a custom action, but it’s more work.
Try usingactivity_updateas theactionIn reply to: Filter bp_has_members() with user_idsThe codex has examples of how to use BP_User_Query to filter the loop and preserve the order of ids.
https://codex.buddypress.org/developer/bp_user_query/#code-examples
In reply to: Add new activity when using wp_create_user?wp_create_userreturns the user id if there are no errors.
https://codex.wordpress.org/Function_Reference/wp_create_userSo try:
$user_id = wp_create_user( // etc ); if( is_wp_error( $user_id) ) echo $user_id->get_error_message(); else bp_update_user_last_activity( $user_id, bp_core_current_time() );In reply to: Add new activity when using wp_create_user?They need to have a last_activity entry in the activity table.
Try:
bp_update_user_last_activity( $user_id, bp_core_current_time() );In reply to: Friend Request Email Subject FilterIn the same function that you reference, you’ll find this filter hook:
$subject = apply_filters( 'friends_notification_new_request_subject', $subject, $initiator_name );So something like:
function lolo_subject( $subject, $initiator_name ) { $subject = $initiator_name . ' wants to be friends'; return $subject; } add_filter( 'friends_notification_new_request_subject', 'lolo_subject', 15, 2 );In reply to: SubdomainsEach network should be different, should uses different plug-ins and has a different themes.
You definitely should not use multi-site.
Remove everything and start over.
Then make sure you can access your subdomains in a browser.
For example: http://yoursubdomain.com
If you can’t, then contact your hosting provider.
You need access before you can do anything else.Most cPanels have a Software tab that includes an installer for WP.
Run it on each of your subdomains.
Then go to wp-admin and start adding themes and plugins.In reply to: Major changes to Edit.phpYou could let it loop thru the fields and then ‘View Source’ or equivalent in the browser and copy / paste the output.
If you do, be sure to adjustvaluein this line to reflect the field ids that you actually use:
<input type="hidden" name="field_ids" id="field_ids" value="2,8,4464" />In reply to: Transfer Groups to New WebsiteYou can post on the jobs forum.
Be sure to include some method of contacting you.Keep it simple.
For example, to overload this file:
/bp-legacy/buddypress/members/single/profile/edit.phpCopy it to here:
/yourtheme/buddypress/members/single/profile/edit.php
and make your changes.In reply to: Activity loop does not work properlyPlease do not bump threads.
You omitted an ‘&’ in this:
<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ).'&scope=just-me,friends,groups,favorites,mentions&per_page=15&action=friendship_created,joined_group,activity_update' ) ) : ?>You’re including all the default params for
scope. Why include them at all?There are other ways of filtering the activity loop:
https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/
https://codex.buddypress.org/plugindev/add-custom-filters-to-loops-and-enjoy-them-within-your-plugin/In reply to: Dashboard crashes upon activation, Shane suggested..Closed.
Please use your existing thread.In reply to: Viewing/Editing ProfilesHow would I be able to change settings and the design…
You can customize the layout ( design ) by following these instructions:
setup template files so that you can customize them.In reply to: Transfer Groups to New Website‘easy to follow’ ?
Sure, if you are or know a developer.
https://buddypress.org/support/topic/how-to-exportimport-groups/I don’t know of any simple ‘click’ interface.
In reply to: BP crashes dashboard according to godaddyWithout root access to your godaddy account, it is not possible to provide a definitive answer.
All we can do is guess and provide general suggestions.
It’s probably due to the large number of pending members.
You may need more memory and / or cpu for your account.You should not make your root access info public.
You can post a job listing here and / or try find a developer who will track down the exact problem and possible solutions.
Try the 2nd one first.
Put it in your theme/functions.php or in bp-custom.php – a file you may need to create.I’m not sure if bbPress functions are available via that action hook, but if they are then this might work:
function imath_activity_dont_save( $activity_object ) { $exclude = array( 'bbp_topic_create', 'bbp_reply_create'); $exclude_forum_ids = array( 1, 23, 44 ); // the ids of the specific forums to exclude if( in_array( $activity_object->type, $exclude ) ) { $forum_id = bbp_get_forum_id(); if( in_array( $forum_id, $exclude_forum_ids ) ) $activity_object->type = false; } } add_action('bp_activity_before_save', 'imath_activity_dont_save', 10, 1 );This is not easy.
You need to use
$activity_object->secondary_item_idto get the topic id.
Then use that to get the forum id.Something like this, untested:
function imath_activity_dont_save( $activity_object ) { global $wpdb; $exclude = array( 'bbp_topic_create', 'bbp_reply_create'); $exclude_forum_ids = array( 1, 23, 44 ); // the ids of the specific forums to exclude if( in_array( $activity_object->type, $exclude ) ) { $topic_id = $activity_object->secondary_item_id; $forum_id = $wpdb->get_var("SELECT post_parent FROM {$wpdb->prefix}posts WHERE ID = $topic_id"); if( in_array( $forum_id, $exclude_forum_ids ) ) $activity_object->type = false; } } add_action('bp_activity_before_save', 'imath_activity_dont_save', 10, 1 );In reply to: Buddypress and Restricting Page AccessIn reply to: troubleshooting the debug.logThe first one refers to bbPress.
And can be difficult to track down. It may be in the bbPress plugin or another plugin that calls bPress .2. Something, not BuddyPress, is creating a Widget using a deprecated constructor method.
3. Is related to a JetPack module.
The first step to getting rid of those Notices is identifying the source, so:
– switch momentarily to a WP theme like 2013 and see if any persist
– turn off plugins one at a time and see if any persistTime consuming…
In reply to: Register/Activate HowtoYes – and remember you can’t see them on the front end while logged in.
Unless you are explictly using the bp-default theme as your Theme,
always use these templatesbp-templates/bp-legacy/buddypress/Re your current activity/index file in your child theme – use the index.php from the bp-legacy location and move any changes you want into that file.
Please add the ticket number here, thx.
You can open a ticket here using the same user / pw as this site.
Which theme are you using?
Just to confirm it’s not a theme issue, please try switching momentarily to a WP theme like 2013 and see if the issue persists.