Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Sub-Blog Doesn't Show Blog Posts


Brajesh Singh
Participant

@sbrajesh

It seems to me, you are unable to catch the blog slug.

make sure , you functions.php has something like this,You can see this code in bp-sn-parent

/* Make sure the blog index page shows under /[HOME_BLOG_SLUG] if enabled */
function bp_dtheme_show_home_blog() {
global $bp, $query_string, $paged;

if ( $bp->current_component == BP_HOME_BLOG_SLUG && ( !$bp->current_action || 'page' == $bp->current_action ) ) {
unset( $query_string );

if ( ( 'page' == $bp->current_action && $bp->action_variables[0] ) && false === strpos( $query_string, 'paged' ) ) {
$query_string .= '&paged=' . $bp->action_variables[0];
$paged = $bp->action_variables[0];
}

query_posts($query_string);

bp_core_load_template( 'index', true );
}
}
add_action( 'wp', 'bp_dtheme_show_home_blog', 2 );

Skip to toolbar