If you look at wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php That’s the template you need to edit in order to change that text.
Inside wp-content/themes/your-theme/
Make a file called buddypress.php
. In that file add the following…
<?php get_header(); ?>
<?php the_post(); the_content(); ?>
<?php get_footer(); ?>
By default BuddyPress will use a file located in your theme that currently exists, something like page.php
as you can read about here.
By creating a buddypress.php
we’re telling BuddyPress to use a custom template loader for all BuddyPress pages and components. Inside that file (buddypress.php) you can do anything you like for the “wrapper” around your BuddyPress stuff. In the code example above for buddypress.php
we’re grabbing the content but not bringing in things like <?php the_title(); ?>
like you will find in a typical page.php
that most WordPress themes will have.
This will remove ALL page titles from BuddyPress pages, as you now have a custom “wrapper” for those areas the plugin will use.
If you wish to remove the title on a per page basis you may simply want to do a CSS solution and do target the body
tag with CSS and then any suitable elements in the HTML. This means you could do something like…
body.activity.directory div.page-inner h2 { display: none; }
If you don’t want to do a CSS solution you can then look into component detection.
Hope that helps.
Thank you for your thorough explanation and my apologies for the delayed response — while this method did get rid of the title, it is still not pulling content from the post editor. Basically, the whole goal behind this is so I can use a shortcode above the buddypress activity feed to insert a small slider. Furthermore, what would I have to add to that php snippet to pull in widgets as well?
Thanks again
How about using Custom Fields?
Or shortcode the activity stream into a page and style it however you want. https://buddydev.com/plugins/bp-activity-shortcode/
@Buddycore — not entirely familiar with that process so I can’t speak to it, thanks for your continued suggestions though.
@functionmunchkin — good idea except for the fact that I use theme from BuddyBoss that has an infinite scroll activity stream, so my goal was to make it work with that as opposed to the way around and having to set a paginated activity. Thanks for the ingestion though — I may use that plugin for other parts of the site.