Skip to content

Instantly share code, notes, and snippets.

@MatRouault
Created May 12, 2015 11:41
Show Gist options
  • Save MatRouault/433b7c6cbd6c77fbccc7 to your computer and use it in GitHub Desktop.
Save MatRouault/433b7c6cbd6c77fbccc7 to your computer and use it in GitHub Desktop.
BBPress with Genesis
//////* BBPRESS *//////
/** Developped locally CAUTION !!! DELETE THIS BEFORE PRODUCTION */
add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
function my_bbp_verify_nonce_request_url( $requested_url )
{
return 'http://localhost:8888' . $_SERVER['REQUEST_URI'];
}
/** Force full width layout on forums posts only*/
add_filter( 'genesis_pre_get_option_site_layout', 'full_width_layout_single_forums' );
function full_width_layout_single_forums( $opt ) {
if ( is_singular (array('forum','topic')) ) {
$opt = 'full-width-content';
return $opt;
}
}
/** Remove post info and post meta on BBPress single post */
add_action ( 'get_header' , 'remove_post_meta_pages' );
function remove_post_meta_pages() {
if ( 'forum' === get_post_type() ) {
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment