Created
April 8, 2019 22:02
-
-
Save alexmustin/ffc0bb055b08274b8bb2451a5f351698 to your computer and use it in GitHub Desktop.
Hello Pro 3 - Page Template files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hello! Pro - Gutenberg 'Blocks' page template | |
* | |
* A template to force full-width layout, remove breadcrumbs, and remove the page title. | |
* | |
* Template Name: Blocks | |
* | |
* @package Hello Pro | |
* @author StudioPress | |
* @license GPL-2.0-or-later | |
* @link https://www.studiopress.com/ | |
*/ | |
// Remove the entry header markup and page title. | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
// Forces full width content layout. | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
// Removes the breadcrumbs. | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
// Runs the Genesis loop. | |
genesis(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hello! Pro - Landing Page template | |
* | |
* This file adds the landing page template to the Hello! Pro Theme. | |
* | |
* Template Name: Landing | |
* | |
* @package Hello Pro | |
* @author StudioPress | |
* @license GPL-2.0-or-later | |
* @link https://www.studiopress.com/ | |
*/ | |
add_filter( 'body_class', 'bid_hello_pro_landing_body_class' ); | |
/** | |
* Adds landing page body class. | |
* | |
* @since 3.0.1 | |
* | |
* @param array $classes Original body classes. | |
* @return array Modified body classes. | |
*/ | |
function bid_hello_pro_landing_body_class( $classes ) { | |
$classes[] = 'landing-page'; | |
return $classes; | |
} | |
// Removes Skip Links. | |
remove_action( 'genesis_before_header', 'genesis_skip_links', 5 ); | |
add_action( 'wp_enqueue_scripts', 'bid_hello_pro_dequeue_skip_links' ); | |
/** | |
* Dequeues Skip Links Script. | |
* | |
* @since 3.0.1 | |
*/ | |
function bid_hello_pro_dequeue_skip_links() { | |
wp_dequeue_script( 'skip-links' ); | |
} | |
// Forces full width content layout. | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
// Removes site header elements. | |
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); | |
// Removes navigation. | |
remove_theme_support( 'genesis-menus' ); | |
// Removes breadcrumbs. | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
// Removes footer widgets. | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
// Removes site footer elements. | |
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
// Runs the Genesis loop. | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment