From: Steve Sutton Date: Tue, 31 Oct 2017 15:10:23 +0000 (-0400) Subject: Add landing page template X-Git-Tag: v1.0.7^2~13 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2477f8d8e3396d3538afbff4bd0534a959f57952;p=WP-Themes%2Fkeweenaw2017.git Add landing page template Setup like Petoskey Area theme landing page. But using the styles from the Blocks. --- diff --git a/functions.php b/functions.php index a7b4cef..7fb5f80 100644 --- a/functions.php +++ b/functions.php @@ -155,7 +155,7 @@ add_action('init', 'mytheme_init', 10); function wpse_setup_theme() { add_image_size('glm-block-image', 290, 190,true); } - +// add_image_size('subcat_image', 250,125,true); add_action( 'after_setup_theme', 'wpse_setup_theme' ); function mytheme_search_loop() { while ( have_posts() ) : the_post(); ?> diff --git a/index.php b/index.php index 04474b0..f8e5ee6 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,12 @@ include "sections/search.php"; } if (is_page() && !is_front_page()) { - include "sections/interior-page.php"; + $template = get_page_template_slug( $post->ID ); + if ( $template == 'landingpage-template.php' ) { + include "sections/landing-page.php"; + } else { + include "sections/interior-page.php"; + } } include "sections/footer.php"; // include "sections/copyright.php"; @@ -40,4 +45,4 @@ - \ No newline at end of file + diff --git a/landingpage-template.php b/landingpage-template.php new file mode 100644 index 0000000..bc72fc8 --- /dev/null +++ b/landingpage-template.php @@ -0,0 +1,4 @@ + +

+

+ +
+
+
+ + "; + echo ''; + bcn_display(); + echo "
"; + } + ?> +
+ +
+ +
+ 'page', + 'posts_per_page' => -1, + 'post_parent' => $post->ID, + 'order' => 'ASC', + 'orderby' => 'menu_order' + ); + + $post_parent = $post->ID; + $parent = new WP_Query( $args ); + ?> + have_posts() ) : ?> + have_posts() ) : $parent->the_post(); ?> + + + + +
+ + + +

+
+ + + + +
+ +
+ +