-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
36 lines (30 loc) · 909 Bytes
/
home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Posts Page template
*
* I'm doing a template here because I want to grab the contents from the page and display
* it at the top as a greeting to welcome visitors.
*
* @since 1.0.0
* @package Hello_From_Tonya\Hello_Genesis_AMP
* @author Tonya Mork <hellofromtonya>
* @link https://github.com/hellofromtonya/hello-genesis-amp
* @license GPL-2+
*/
namespace Hello_From_Tonya\Hello_Genesis_AMP;
use function Hello_From_Tonya\Hello_Genesis_AMP\Structure\render_hero_content;
add_action( 'genesis_before_content_sidebar_wrap', __NAMESPACE__ . '\render_contents' );
/**
* Render the contents out to the browser.
*
* @since 1.0.0
*/
function render_contents() {
$post_id = get_option( 'page_for_posts' );
$page_for_posts = get_post( $post_id );
if ( ! $page_for_posts ) {
return;
}
include __DIR__ . '/lib/views/hero-section.php';
}
genesis();