Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created May 15, 2017 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/e076b5e17b8571a27568a6ba2bac41cf to your computer and use it in GitHub Desktop.
Save billerickson/e076b5e17b8571a27568a6ba2bac41cf to your computer and use it in GitHub Desktop.
<?php
/* Template Name: Landing */
/**
* Landing Content
*
*/
function ea_landing_content() {
// Password Protection
if( post_password_required() ) {
global $post;
echo '<div class="landing-section"><div class="wrap">';
echo '<h2>Password Required</h2>';
echo get_the_password_form( $post );
echo '</div></div>';
return;
}
// Landing page content
$sections = ea_cf( 'ea_landing_content', get_the_ID(), array( 'cf_type' => 'complex' ) );
//...
}
get_header();
ea_landing_content();
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment