Skip to:
Content
Pages
Categories
Search
Top
Bottom

acknowledge post editor content above activity stream


  • etavio
    Participant

    @etavio

    Hey guys, I just recently installed buddypress and I think it will be amazing for my community. I have set the activity page as the “front page” of my site and now I have two questions:

    1. How do I disable the title of the activity feed so it does not say “site-wide activity” or anything at all for that matter?

    2.How can I enable the post editor so I can add static content just above the activity feed? Right now any content that I add via the post editor appears to be overridden by the template, which is to be expected.

    I understand enough about WordPress to know that both of these issues are resolved through templates, but I would sincerely appreciate a response tailored for a wordpress beginner as I am new to php edits. I do have a child theme already created but don’t know where to go from there.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)

  • buddycore
    Participant

    @buddycore

    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.


    etavio
    Participant

    @etavio

    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


    buddycore
    Participant

    @buddycore

    How about using Custom Fields?


    Stacy (non coder)
    Participant

    @functionmunchkin

    Or shortcode the activity stream into a page and style it however you want. https://buddydev.com/plugins/bp-activity-shortcode/


    etavio
    Participant

    @etavio

    @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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar