Replies
- Brajesh Singh on April 18, 2016 at 4:42 pm in reply to: [Resolved] Blog Categories For Groups and Custom Taxonomies #3564
Hi Ada,
I am sorry. I will post the code tonight.Thank you
Brajesh - Brajesh Singh on April 18, 2016 at 4:42 pm in reply to: [Resolved] BP Simple Front End Post Form #3563
Hi Leo,
Thank you for the details.1. Are you using any custom code to assign categories or terms? Please post me the custom codes you are using.
2. The two forms are different and even if they are being edited from same place, should have different setup unless some custom code is being used to assign/manipulate categories.There is no problem in using categories.
I will be contacting the wpml.org about the plan. Hoping that it will help us in providing compatible plugins in future.
Thank you
Brajesh - Brajesh Singh on April 17, 2016 at 4:39 pm in reply to: [Resolved] BP Simple Front End Post Form #3553
Hi Leo,
Thank you. I will look into it and will get back to you in next couple of hours.Thank you
Brajesh - 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