Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: adding content to the 1.2 default theme homepage


lautering
Participant

@lautering

Just to add more detail: this is what renders the activity stream on the homepage. Commenting out the small amount of code in home.php doesn’t seem to do anything. Commenting this out in functions.php seems to break things.

Is there a way to either eliminate the option to set what appears on your homepage, thus giving you complete control over what appears there (and maybe building/adding a special “Activity” page to replace it), or to amend this function in some way that let’s you call modify how it renders?

function bp_dtheme_show_on_frontpage() {
$settings = get_option( 'bp_dtheme_options' );

if ( empty( $settings['show_on_frontpage'] ) || 'blog' == $settings['show_on_frontpage'] )
return 'blog';

return 'activity';
}

I completely understand the easy-to-use, out-of-the-box logic behind the setting for what appears on your homepage, and it’s certainly Facebook-like, but I’m using the default template to build out a full site that needs to have a unique hompeage with other content elements. The activity stream is a small part of it, and I’d like to have it there in some way, but certainly not as prominent as it is now.

This is the code that’s in home.php (all of it):

<?php
/***
* Should we show the blog on the front page, or the activity stream?
* This is set in wp-admin > Appearance > Theme Options
*/

if ( 'blog' == bp_dtheme_show_on_frontpage() )
locate_template( array( 'index.php' ), true );
else
locate_template( array( 'activity/index.php' ), true );
?>

The comment obviously notes the intention of activity stream OR blog, but what about ‘neither’? I’m going to work on this later, but one idea I have is to try to add a third option of “custom”, which would pull something like “custom.php”. Sound right? Something else?

Thanks in advance!

Skip to toolbar