add_action() is your friend.
No need to edit the templates directly.
For example, to add custom content after the random blogs:
Add this to /wp-content/plugins/bp-custom.php:
function my_custom_content_after_random_blogs() {
echo 'MY CONTENT AFTER RANDOM BLOGS';
}
add_action('bp_after_directory_blogs_featured', 'my_custom_content_after_random_blogs');
How do you find these actions? Look for do_action() code in your /wp-content/themes/bp-sn-parent/directories/COMPONENT/index.php.
So HTML and script objects will work fine with this method? Also, I don’t see how this will specify it to be underneath the random blogs listed on the blog directory in the right column.
I’ll give it a go, but I want to understand what I’m doing .
EDIT: Thank you for the directory structure for the components, if I can’t figure out your bp-custom method, I’ll be able to do it directly.
Also, I don’t see how this will specify it to be underneath the random blogs listed on the blog directory in the right column.
This is the magic:
add_action('bp_after_directory_blogs_featured', 'my_custom_content_after_random_blogs');
This tells the “bp_after_directory_blogs_featured” do_action part of code in /wp-content/themes/bp-sn-parent/directories/blogs/index.php to plug in your custom code.