From 2477f8d8e3396d3538afbff4bd0534a959f57952 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 31 Oct 2017 11:10:23 -0400 Subject: [PATCH] Add landing page template Setup like Petoskey Area theme landing page. But using the styles from the Blocks. --- functions.php | 2 +- index.php | 9 +++-- landingpage-template.php | 4 +++ sections/landing-page.php | 71 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 landingpage-template.php create mode 100644 sections/landing-page.php 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(); ?> + + + + +
+ + + +

+
+ + + + +
+ +
+ +
-- 2.17.1