Skip to content

Instantly share code, notes, and snippets.

@seothemes
Created October 26, 2017 23:21
Show Gist options
  • Save seothemes/17c650ef3fb2f8f74e56ee72b7cf4ba4 to your computer and use it in GitHub Desktop.
Save seothemes/17c650ef3fb2f8f74e56ee72b7cf4ba4 to your computer and use it in GitHub Desktop.
Business Pro Custom Template (No Hero Section)
<?php
/**
* Template Name: Custom Template
*
* @package Business Pro
* @link https://seothemes.com/themes/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'body_class', 'business_custom_template_body_class', 99 );
/**
* Add page-builder body class to copy header style.
*
* @since 1.0.0
*
* @param array $classes Default body classes.
* @return array $classes Default body classes.
*/
function business_custom_template_body_class( $classes ) {
$classes[] = 'page-template-page-builder';
return $classes;
}
// Remove page header section.
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
remove_action( 'genesis_after_header', 'business_page_header_close', 28 );
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
// Add page title back to default position.
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
add_action( 'genesis_entry_header', 'genesis_do_post_title' );
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
// Run Genesis.
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment