
Let us make the activity comment form visible. Now, we will write some javascript and css to make it work like facebook activity commenting. I am including these from my child theme, you can change the above line to make sure you are loading it correctly from your theme. Wp_enqueue_script("bpfb-comment-autogrow-js", get_stylesheet_directory_uri()."/_inc/",array('jquery')) Wp_enqueue_script("bpfb-comment-js", get_stylesheet_directory_uri()."/_inc/comment.js",array('jquery','jquery-effects-core', 'dtheme-ajax-js')) Return //we do not want to include the js include the javascript, change it as you wantĪdd_action("wp_print_scripts","bp_fbstyle_comment_js") Here is the code you need to put in functions.php You should create comment.js in the_inc folder of your theme and also put the autogrow plugin there. Since I don't want to temper with core files of bp-default(read it whatever theme you use), We will be including the code to load out comment.js and the autogrow textarea plugin. You can put the following code in functions.php to stop mulitlevel commentingĪdd_filter('bp_activity_can_comment_reply','_return_false')

I know it is a bad decision, but this is what facebook does. But before that, lets have a look at the final screenshot.

The script is a part of jQuery grab bag by Jason Frame JQuery AutoGrow textArea:- We will use it for autogrowing comment text box. Make activity comment section look like facebook.In addition to writing css/js, we will need one jquery plugin to autogrow the text area as a user types. you can easily modify it for other themes. I will be doing it by using bp-default theme as an example.
#BUDDYPRESS ANIMATE IT HOW TO#
How many of you use facebook for connecting with Friends and family, I believe almost all 🙂 Today, I am going to show how to make the BuddyPress Activity Stream activity commenting look/work like facebook activity commenting. Brajesh Singh in BuddyPress Tricks 51 Comments
