From: Laury GvR Date: Thu, 13 Jul 2017 21:08:55 +0000 (-0400) Subject: Separate members only news from regular news posts X-Git-Tag: v1.0.0^2~43 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ac913a68d331f85dac1c347d73c343046d398b00;p=WP-Themes%2Ftruenorthgolf.git Separate members only news from regular news posts --- diff --git a/archive.php b/archive.php index 0f34704..19aea22 100644 --- a/archive.php +++ b/archive.php @@ -1,49 +1,34 @@
- +
-
- -
-
-
> -
-

- -
- - -
+ + + + slug == 'members-only' ) { ?> + + +
+ + +
+ + + + + + + +
+
-
- - - -
-

-
- + +
- -
diff --git a/assets/default-header.jpg b/assets/default-header.jpg new file mode 100644 index 0000000..ee890fb Binary files /dev/null and b/assets/default-header.jpg differ diff --git a/css/app.css b/css/app.css index 555a7a9..e8a3cad 100644 --- a/css/app.css +++ b/css/app.css @@ -7016,59 +7016,59 @@ main .wp-caption p.wp-caption-text { text-align: left; } main p a { font-weight: bold; } +main .blocks .block-thumb-wrap { + text-align: center; + max-height: 230px; + overflow: hidden; } + @media (max-width: 1024px) { + main .blocks .block-thumb-wrap { + max-height: 170px; } } +main .blocks .block { + margin-bottom: 80px; + transition: all 0.2s ease in out; } + main .blocks .block img { + border: none; + padding: 0; } + main .blocks .block h1 { + font-family: "ingram-wide-2"; + color: #000000; } + main .blocks .block h3 { + color: #000000; + font-family: "ingram-wide-2"; + text-align: center; + font-size: 22px; + margin-top: 0; + margin-left: 15px; + margin-right: 15px; + text-transform: uppercase; + padding-top: 8px; } + main .blocks .block p { + color: #888888; + text-align: center; + font-size: 18px; } + main .blocks .block .block-text a { + color: #b32024; } + main .blocks .block .block-readmore { + text-align: center; + font-size: 0.9375rem; + display: block; + padding-bottom: 10px; + margin: 0 15px; + color: #b32024; + text-transform: uppercase; + /*position: absolute;*/ + /*bottom: 0;*/ } + main .blocks .block .block-more-arrow-right:before { + content: '\2192'; } + main .blocks .block a:hover span { + padding: 0 0 0 20px; } + main .blocks .block a span { + transition: all 0.2s ease-in-out; } main.page-front { margin-top: -25px; } @media (max-width: 1024px) { main.page-front { margin: 0 auto; } } - main.page-front .blocks .block-thumb-wrap { - text-align: center; - max-height: 230px; - overflow: hidden; } - @media (max-width: 1024px) { - main.page-front .blocks .block-thumb-wrap { - max-height: 170px; } } - main.page-front .blocks .block { - margin-bottom: 80px; - transition: all 0.2s ease in out; } - main.page-front .blocks .block img { - border: none; - padding: 0; } - main.page-front .blocks .block h1 { - font-family: "ingram-wide-2"; - color: #000000; } - main.page-front .blocks .block h3 { - color: #000000; - font-family: "ingram-wide-2"; - text-align: center; - font-size: 22px; - margin-top: 0; - margin-left: 15px; - margin-right: 15px; - text-transform: uppercase; - padding-top: 8px; } - main.page-front .blocks .block p { - color: #888888; - text-align: center; - font-size: 18px; } - main.page-front .blocks .block .block-text a { - color: #b32024; } - main.page-front .blocks .block .block-readmore { - text-align: center; - font-size: 0.9375rem; - display: block; - padding-bottom: 10px; - margin: 0 15px; - color: #b32024; - text-transform: uppercase; - /*position: absolute;*/ - /*bottom: 0;*/ } - main.page-front .blocks .block .block-more-arrow-right:before { - content: '\2192'; } - main.page-front .blocks .block a:hover span { - padding: 0 0 0 20px; } - main.page-front .blocks .block a span { - transition: all 0.2s ease-in-out; } main.page-front #main-content { margin-top: 25px; } main.page-front #main-content h1 { @@ -7679,6 +7679,12 @@ body #glm-member-detail-container #glm-package-detail-member-name h3 { body #glm-member-detail-container #glm-package-detail-member-name a:hover { color: white; text-decoration: underline; } +body .members-only-template #menu-side h2 a { + color: white; + font-size: 1.875rem; + font-family: "ingram-wide-2"; } + body .members-only-template #menu-side h2 a:hover { + border-bottom: 1px solid white; } body .members-only-template #side-links { background-color: #b32024; border: 1px solid #ffc742; @@ -7690,6 +7696,9 @@ body .members-only-template #menu-members-only-menu { list-style: outside none none; } body .members-only-template #side-links h2 { color: #FFFFFF; } +body .members-only-template #side-links li { + line-height: 1; + margin-bottom: 10px; } body .members-only-template #side-links li a { color: #FFFFFF; text-decoration: none; @@ -7697,8 +7706,19 @@ body .members-only-template #side-links li a { body .members-only-template #side-links li a:hover { color: #ffc742; border-bottom: 1px solid #ffc742; } +body #glm-member-front-header { + border-bottom: 1px solid lightgrey; + margin: 5px 10px 10px; + padding: 10px; } body #glm-member-front-header .glm-button.button { background-color: #b32024; } +body #glm-member-front-header .glm-member-greeting { + float: left; + padding: 6px; } +body #glm-member-front-header .button.glm-button { + float: right; + padding: 0.4em 0.8em; + border-radius: 4px; } #front { padding: 20px; } @@ -7767,12 +7787,18 @@ body #glm-member-front-header .glm-button.button { #front .row.collapse #video img { margin: 0; } } +.blog-posts-container { + clear: both; } + #blog-posts-over .commentlist .comment { border: 1px solid lightgrey; border-radius: 5px; margin: 20px 0; padding: 10px; } +#blog-posts-over .glm-button { + margin: 4px; } + #blog-posts-over .vcard { border: 0; } diff --git a/front-page.php b/front-page.php index 1e22264..a7189ee 100644 --- a/front-page.php +++ b/front-page.php @@ -5,7 +5,7 @@
- + @@ -18,7 +18,7 @@
diff --git a/functions.php b/functions.php index 5ea2316..7f6fa3b 100644 --- a/functions.php +++ b/functions.php @@ -29,6 +29,23 @@ if (!function_exists('glm_quicksite_widget_init')) { } +// Usage: +// get_id_by_slug('any-page-slug'); +if ( ! function_exists( 'get_block_id_by_slug' ) ) { + function get_block_id_by_slug($post_slug) { + + $the_block = get_page_by_path( $post_slug, OBJECT, 'glm_blocks' ); + if ($the_block) { + return $the_block->ID; + } else { + return null; + } + + } +} +DEFINE("MEMBERS_ONLY_GROUP", get_block_id_by_slug('members-only-group')); +DEFINE("FRONT_PAGE_GROUP",get_block_id_by_slug('front-page-group')); + /** * get_menu_options * @@ -60,7 +77,7 @@ if ( ! function_exists( 'truenorthgolf_top_bar_left' ) ) { 'container_class' => '', // class of container 'menu' => '', // menu name 'menu_class' => '', // adding custom nav class - 'theme_location' => 'top-bar-left', // where it's located in the theme + 'theme_location' => 'top-bar-left', // where it's located in the theme 'before' => '', // before each link 'after' => '', // after each link 'link_before' => '', // before each link text @@ -78,7 +95,7 @@ if ( ! function_exists( 'truenorthgolf_top_bar_right' ) ) { 'container_class' => '', // class of container 'menu' => '', // menu name 'menu_class' => '', // adding custom nav class - 'theme_location' => 'top-bar-right', // where it's located in the theme + 'theme_location' => 'top-bar-right', // where it's located in the theme 'before' => '', // before each link 'after' => '', // after each link 'link_before' => '', // before each link text diff --git a/glm-members-only-template.php b/glm-members-only-template.php index 1896ac2..cd06209 100644 --- a/glm-members-only-template.php +++ b/glm-members-only-template.php @@ -19,14 +19,22 @@ Template Name: GLM Members Only Template ?>
-->
- diff --git a/home.php b/home.php index ec75faf..248e8d5 100644 --- a/home.php +++ b/home.php @@ -1,11 +1,8 @@
- +
-
@@ -17,24 +14,6 @@ - - -
diff --git a/index.php b/index.php index 07b7d72..74299bb 100644 --- a/index.php +++ b/index.php @@ -1,157 +1,23 @@ - - - - - - <?php wp_title(); ?> - - - - - - - -
-
-
-
-
- -
- -
-
- - -
-
- - - -
-
- -
-
-
-
- -
-
-
-
- -
-

MICHIGAN’S ANSWER TO GREAT GOLF

-

Whether you’re looking for classic layouts, championship challenges, or a weekend oasis of golf, Michigan’s Central Swing has it all. With 11 amazing courses and 11 relaxing retreats, Michigan’s Central Swing is the destination every golfer is looking for.

- more info... -
-
-
-
-
-
-

Our Blog

- -
-
- -
-
-
- -
- - -
-
- -
- -
-
-
- diff --git a/parts/blog-archive-content.php b/parts/blog-archive-content.php new file mode 100644 index 0000000..60b693f --- /dev/null +++ b/parts/blog-archive-content.php @@ -0,0 +1,21 @@ + +
+
+
> +
+

+ +
+ +
+
+
+ + + +
+

+
+ \ No newline at end of file diff --git a/parts/blog-sidebar-members-only.php b/parts/blog-sidebar-members-only.php new file mode 100644 index 0000000..690970d --- /dev/null +++ b/parts/blog-sidebar-members-only.php @@ -0,0 +1,41 @@ +
+
+
+
+ +
+
+

Recent Posts

+
    + '5', 'post_status' => 'publish', 'category_name' => 'members-only' ); + $recent_posts = wp_get_recent_posts( $args ); + foreach( $recent_posts as $recent ){ + echo '
  • ' . $recent["post_title"].'
  • '; + } + ?> +
+

Categories

+
    + 'name', + 'order' => 'ASC', + 'category_name' => 'members-only' + ); + $categories = get_categories($args); + foreach($categories as $category) { + if ( $category->slug == "members-only") { + echo '
  • name ) . '" ' . '>' . $category->name.'
  • '; + + } + } + ?> +
+

Archive

+
    'monthly', 'limit' => 12 ) ); ?>
+ +
+ +
\ No newline at end of file diff --git a/parts/blog-sidebar-r.php b/parts/blog-sidebar-r.php index f822cd6..540692e 100644 --- a/parts/blog-sidebar-r.php +++ b/parts/blog-sidebar-r.php @@ -8,11 +8,12 @@

Recent Posts

    '5', 'post_status' => 'publish' ); - $recent_posts = wp_get_recent_posts( $args ); - foreach( $recent_posts as $recent ){ - echo '
  • ' . $recent["post_title"].'
  • '; - } + $members_only_category = get_term_by('slug', 'members-only', 'category'); + $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'category__not_in' => $members_only_category->term_id ); + $recent_posts = wp_get_recent_posts( $args ); + foreach( $recent_posts as $recent ){ + echo '
  • ' . $recent["post_title"].'
  • '; + } ?>

Categories

@@ -24,7 +25,10 @@ ); $categories = get_categories($args); foreach($categories as $category) { - echo '
  • name ) . '" ' . '>' . $category->name.'
  • '; } + if ($category->term_id !== $members_only_category->term_id ) { + echo '
  • name ) . '" ' . '>' . $category->name.'
  • '; + } + } ?>

    Archive

    diff --git a/parts/glm-blocks-front.php b/parts/glm-blocks-front.php new file mode 100644 index 0000000..19f8637 --- /dev/null +++ b/parts/glm-blocks-front.php @@ -0,0 +1,31 @@ + + + + + diff --git a/parts/glm-blocks-members-only.php b/parts/glm-blocks-members-only.php new file mode 100644 index 0000000..2d3674c --- /dev/null +++ b/parts/glm-blocks-members-only.php @@ -0,0 +1,31 @@ + + + + + diff --git a/parts/glm-blocks.php b/parts/glm-blocks.php deleted file mode 100644 index a4be62a..0000000 --- a/parts/glm-blocks.php +++ /dev/null @@ -1,30 +0,0 @@ - - - - diff --git a/parts/glm-members-only-top-bar.php b/parts/glm-members-only-top-bar.php index bb67f35..3c49979 100644 --- a/parts/glm-members-only-top-bar.php +++ b/parts/glm-members-only-top-bar.php @@ -2,7 +2,8 @@
    Hello, user_login ?>.
    Logout - - Enter Admin Area + + Enter Admin Area + ">Members Home \ No newline at end of file diff --git a/parts/interior-footer.php b/parts/interior-footer.php deleted file mode 100644 index 7823eaa..0000000 --- a/parts/interior-footer.php +++ /dev/null @@ -1,22 +0,0 @@ -
    - -
    -
    -
    - - - - -
    -
    -

    MICHIGAN’S ANSWER TO GREAT GOLF

    -

    Whether you’re looking for classic layouts, championship challenges, or a weekend oasis of golf, Michigan’s Central Swing has it all. With 11 amazing courses and 11 relaxing retreats, Michigan’s Central Swing is the destination every golfer is looking for.

    - - - more info... - -
    -
    -
    -
    - diff --git a/parts/members-sidebar.php b/parts/members-sidebar.php index da2e5a7..a73e598 100644 --- a/parts/members-sidebar.php +++ b/parts/members-sidebar.php @@ -6,4 +6,6 @@ + +

    True North News

    \ No newline at end of file diff --git a/scss/_blog.scss b/scss/_blog.scss index 2eccacf..4dcaacd 100644 --- a/scss/_blog.scss +++ b/scss/_blog.scss @@ -86,12 +86,18 @@ } } } +.blog-posts-container { + clear: both; +} #blog-posts-over .commentlist .comment { border: 1px solid lightgrey; border-radius: 5px; margin: 20px 0; padding: 10px; } +#blog-posts-over .glm-button { + margin: 4px; +} #blog-posts-over .vcard { border: 0; } diff --git a/scss/_main.scss b/scss/_main.scss index f7bf74c..f1880da 100644 --- a/scss/_main.scss +++ b/scss/_main.scss @@ -43,77 +43,76 @@ main { p a { font-weight: bold; } - &.page-front { - - margin-top: -25px; - @media (max-width: 1024px) { - margin: 0 auto; + .blocks { + .block-thumb-wrap { + text-align: center; + max-height: 230px; + @media (max-width: 1024px) { + max-height: 170px; + } + overflow: hidden; } - .blocks { - - .block-thumb-wrap { - text-align: center; - max-height: 230px; - @media (max-width: 1024px) { - max-height: 170px; + .block { + margin-bottom: 80px; + transition: all .2s ease in out; + img { + border: none; + padding: 0; + @media (min-width: 640px) { + /*width:99%;*/ } - overflow: hidden; } - .block { - margin-bottom: 80px; - transition: all .2s ease in out; - img { - border: none; - padding: 0; - @media (min-width: 640px) { - /*width:99%;*/ - } - } - h1 { - font-family: "ingram-wide-2"; - color: $black; - } - h3 { - color: $black; - font-family: "ingram-wide-2"; - text-align: center; - font-size: 22px; - margin-top: 0; - margin-left: 15px; - margin-right: 15px; - text-transform: uppercase; - padding-top: 8px; - } - p { - color: $dark-grey; - text-align: center; - font-size: 18px; - } - .block-text a { - color: $red; - } - .block-readmore { - text-align: center; - font-size: rem-calc(15); - display: block; - padding-bottom: 10px; - margin: 0 15px; - color: $red; - text-transform: uppercase; - /*position: absolute;*/ - /*bottom: 0;*/ - } - .block-more-arrow-right:before { - content: '\2192'; // right arrow - } - a:hover span { - padding: 0 0 0 20px; + h1 { + font-family: "ingram-wide-2"; + color: $black; + } + h3 { + color: $black; + font-family: "ingram-wide-2"; + text-align: center; + font-size: 22px; + margin-top: 0; + margin-left: 15px; + margin-right: 15px; + text-transform: uppercase; + padding-top: 8px; + } + p { + color: $dark-grey; + text-align: center; + font-size: 18px; + } + .block-text a { + color: $red; + } + .block-readmore { + text-align: center; + font-size: rem-calc(15); + display: block; + padding-bottom: 10px; + margin: 0 15px; + color: $red; + text-transform: uppercase; + /*position: absolute;*/ + /*bottom: 0;*/ + } + .block-more-arrow-right:before { + content: '\2192'; // right arrow + } + a:hover span { + padding: 0 0 0 20px; - } - a span { - transition: all .2s ease-in-out; - } } + a span { + transition: all .2s ease-in-out; + } + } + } + &.page-front { + + margin-top: -25px; + @media (max-width: 1024px) { + margin: 0 auto; } #main-content { margin-top: 25px; diff --git a/scss/plugins/_glm-member-db.scss b/scss/plugins/_glm-member-db.scss index 672111f..3b96b24 100644 --- a/scss/plugins/_glm-member-db.scss +++ b/scss/plugins/_glm-member-db.scss @@ -176,6 +176,14 @@ body { } } .members-only-template { + #menu-side h2 a { + color: white; + font-size: 1.875rem; + font-family: "ingram-wide-2"; + &:hover { + border-bottom: 1px solid white; + } + } #side-links { background-color: $red; border: 1px solid $gold; @@ -190,6 +198,10 @@ body { #side-links h2 { color: $white; } + #side-links li { + line-height: 1; + margin-bottom: 10px; + } #side-links li a { color: $white; text-decoration: none; @@ -200,7 +212,21 @@ body { border-bottom: 1px solid $gold; } } +#glm-member-front-header { + border-bottom: 1px solid lightgrey; + margin: 5px 10px 10px; + padding: 10px; +} #glm-member-front-header .glm-button.button { background-color: $red; } +#glm-member-front-header .glm-member-greeting { + float: left; + padding: 6px; +} +#glm-member-front-header .button.glm-button { + float: right; + padding: .4em .8em; + border-radius: 4px; +} } // End of global body tag to overwrite existing member db styles \ No newline at end of file diff --git a/single.php b/single.php index a01e9a8..d25a41e 100644 --- a/single.php +++ b/single.php @@ -1,7 +1,7 @@
    - +
    @@ -11,7 +11,7 @@ echo '
    '; } else { echo '
    '; - + } ?>
    @@ -37,17 +37,17 @@ - $cat->name, 'slug' => $cat->slug ); -// echo ''. $cat->name .', '; -// } -// } + foreach($post_categories as $c){ + $cat = get_category( $c ); + $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug ); + echo ''. $cat->name .', '; + } + } // $post_tags = wp_get_post_tags( get_the_ID() ); // $tags = array(); // if (has_tag( )) { @@ -66,8 +66,8 @@
    - - + +