Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hello Pro 3 - Page Template files
<?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();
<?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
You can’t perform that action at this time.