Replies
- Brajesh Singh on April 17, 2016 at 4:28 pm in reply to: [Resolved] Passing field data with jQuery (or alternative) #3550
Thank you Andrew,
I am happy it is resolved now.Regards
Brajesh - Brajesh Singh on April 17, 2016 at 4:27 pm in reply to: [Resolved] BP Simple Front End Post Form #3549
Hi Leo,
Is it happening for new posts or the old posts? This solution should only work with new posts using the custom form.Please let me know and I will check the code.
Thank you
Brajesh - Brajesh Singh on April 17, 2016 at 12:40 pm in reply to: [Resolved] Passing field data with jQuery (or alternative) #3546
Hi Andrew,
Now, I can see the problem.Field 1140 is not part of your registration forms, so BuddyPress is not saving it even if we put it in the post fields. Earlier, I assumed that you had hidden this field using css and that’s why i suggested the above suggestion.
For you, a better option will be using the following code
function buddydev_update_related_field( $user_id ) { //get the field value $field_data = xprofile_get_field_data(960, $user_id ); if ( ! empty( $field_data ) ) { xprofile_set_field_data( 1140, $user_id, $field_data ); } } add_action( 'bp_core_activated_user', 'buddydev_update_related_field' );On activation, we fetch and update the field. Please test it and let me know if it works or not?
Thank you
Brajesh - Brajesh Singh on April 17, 2016 at 9:45 am in reply to: [Resolved] BP Simple Front End Post Form #3544
Hi Leo,
I am sorry. Ravi will be back tomorrow.
I had a look at the above code and I see that Ravi missed to post the last line.Please add this line
$form->show();after this
$form = bp_get_simple_blog_post_form( $form_id );That should work.
Regards
Brajesh - Brajesh Singh on April 17, 2016 at 9:35 am in reply to: [Resolved] Add hover popups at the User's Profile #3543This reply has been marked as private.
- Brajesh Singh on April 17, 2016 at 9:30 am in reply to: [Resolved] Passing field data with jQuery (or alternative) #3542
Hi Andrew,
Can you please point me to your registration page. I will be in a much better position to help you if I can see the fields.Thank you
Brajesh - Brajesh Singh on April 17, 2016 at 9:26 am in reply to: Group Categories and restricting which ones display. #3541
Hi Phil,
Please use the following code to assign a default category.//set default categorywhen post is being saved function bcg_set_default_category_to_post( $post_id ) { $post = get_post( $post_id ); if ( ! $post ) { return ; } $terms = wp_get_object_terms( $post_id, 'category' ); if ( empty( $terms ) || ( count( $terms ) == 1 && $terms[0]->term_id == 1 ) ) { $term_id = 32;//please change it with the default term you want to assign wp_set_object_terms( $post->ID, $term_id, 'category' ); } } add_action( 'bsfep_post_saved', 'bcg_set_default_category_to_post' );Please make sure to change $term_id to your choice of default term id.
Hope that helps
Regards
Brajesh - Brajesh Singh on April 17, 2016 at 9:25 am in reply to: [Resolved] [Blog Categories For Groups] Auto-creating & selecting cats for groups #3540
Closing it as resolved due to lack of reply. Please feel free to reopen if you need further assistance.
Thank you
Brajesh - Brajesh Singh on April 15, 2016 at 2:16 pm in reply to: Group Categories and restricting which ones display. #3534
Hi Phil,
Ravi will be away for the weekend. I will post the code tonight.
It is a quick fix and not any paid service.Thank you
Brajesh - Brajesh Singh on April 15, 2016 at 2:14 pm in reply to: Could blog-categories-for-groups post to a groups activity stream? #3533
A solution may be deleting the automatically created activity based on tags, but I am not sure if that will be appropriate.