Hi,
It is a bug with BuddyPress and there is still an open ticket for the purpose.
You can see the details here
https://buddypress.trac.wordpress.org/ticket/5087
and here
https://buddypress.trac.wordpress.org/ticket/5643
At the moment, there does not seem to be a solution. The problem is that query variable ‘s’ is used for Normal WordPress search as well as BuddyPress activity search too. So, When BuddyPress activity is set as home page, the wordpress search query( which is like sitename/?s=someterm) is mistaken for BuddyPress activity search and gets handled by BuddyPress causing the trouble.
It will need some work on the way BuddyPress catches url(I am hoping that). let us hope that it makes to the core soon.
That’s really too bad. Looks like it has been moved to a future release instead of 2.2 unfortunately.
Is there a way to replicate the Activity Loop, Comment Box, etc. on a separate homepage instead of using the ‘Activity Stream’ template?
For example, the theme I’m using allows me to display the activity loop using shortcode and that doesn’t seem to cause an issue. So, I think if I could build a front-page.php template that performed the activity loop, comments, etc., it would bypass the issue.
I tried to copy and paste the index.php content from buddypress/activity/ into a front-page.php file, and the formatting didn’t work out because I think all the references rely on the files being located in the original hierarchy.
Hi,
You are right about creating a home.php or front-page file and putting the content from activity/index.php
Here are a couple of things that I may suggest to improve it.
Since you are using the code (which is part of bp-legacy template and most theme include that), you activity/index.php does not have header/footer.
The easy way is.
1. copy the page.php from your theme and rename it to home.php
2. Now look for the section where you see the loop code( something like while(have_posts()) ..etc, replace only that section of code with the the content of actvity/index.php or you can put this line
<?php bp_get_template_part( 'activity/index' ); ?>
It will include the activity loop inside your home page.
You may want to look for the div/classes that is generated for your post. If you can inject that, it should look fine(as your theme supports bp and they should have the css.
If it does not work, please post the content of your homepage on pastebin and I will modify it for you 🙂
Thanks for the advise. When I do that, it does not load the wall post text box or tabs that are normally found on the activity page. Do I have to copy the entire contents of /activity to my theme root?
You should copy the entire buddypress folder from the bp-legacy folder to your root anyway, this will allow easy adjustment of those core templates, and you get easier access to those files to copy code for new page-templates you can add to your root folder.
Perhaps you might have to alter Brajesh Singh’s code to this, not sure.
<?php bp_get_template_part( 'buddypress/activity/index' ); ?>
Another way around would be plugins that allow activity as shortcode to be placed on any page, but more plugins is not necessarily a good idea.
Good luck
Peter Hamilton
Onlijn.com