transmitstudio
10/19/2016 - 5:55 PM

Add taglines or headers to top of specific pages or categories in Beaver Builder pages

Add taglines or headers to top of specific pages or categories in Beaver Builder pages

//* Add page taglines
function xmit_news_header() {
// can use if ( is_singular( 'cptslug' ) ) to add this to a particular post type
	if ( is_single() && has_category('news')) {
		FLBuilder::render_query( array(
				'post_type' => 'fl-builder-template', // can also be page, post, etc.
				'p'         => 278 // post id of BB template
			) );
		}
	elseif ( is_single() && has_category('success-stories')) {
		FLBuilder::render_query( array(
				'post_type' => 'fl-builder-template',
				'p'         => 281
			) );
		}
}
add_action( 'fl_after_header', 'xmit_news_header' );