mirror of
https://github.com/10h30/ycb.vn.git
synced 2026-06-05 15:10:02 +09:00
61 lines
1.5 KiB
PHP
61 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Page Builder
|
|
*
|
|
* This file adds the page builder template to the Business Pro
|
|
* theme. It removes everything between the site header and footer
|
|
* leaving a blank template perfect for page builder plugins.
|
|
*
|
|
* @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;
|
|
|
|
}
|
|
|
|
// Remove default page header.
|
|
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
|
|
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
|
|
remove_action( 'genesis_after_header', 'business_page_header_close', 28 );
|
|
|
|
// Remove before footer widget area.
|
|
remove_action( 'genesis_footer', 'business_before_footer_widget_area', 5 );
|
|
|
|
|
|
/**
|
|
* Add attributes for site-inner element, since we're removing 'content'.
|
|
*
|
|
* @param array $attributes Existing attributes.
|
|
* @return array Amended attributes.
|
|
*/
|
|
function be_site_inner_attr( $attributes ) {
|
|
// Add the attributes from .entry, since this replaces the main entry
|
|
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
|
|
return $attributes;
|
|
}
|
|
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
|
|
|
|
|
|
// Get site-header.
|
|
get_header();
|
|
|
|
//Custom loop, remove all hooks except entry content.
|
|
if ( have_posts() ) :
|
|
|
|
the_post();
|
|
|
|
do_action( 'genesis_entry_content' );
|
|
|
|
endif; // End loop.
|
|
|
|
// Get site-footer.
|
|
get_footer();
|