From a64a8018a6137ccab3a531650765287a231ca51e Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Mon, 17 Jul 2017 13:52:36 -0400 Subject: [PATCH] Separated blog sections for members and non-members Instead of using categories to separate the two blog sections we've decided to use a custom post type (member_post). I was able to reuse some of the custom post declaration that Steve put together for Trout Creek. The client can add member posts through an admin menu just below the regular posts menu, and this has its own set of categories that won't be visible to non-members. This also means Categories can be displayed again, so these are currently not hidden from the sidebar (but can be if still desired.) Single posts, archives, home, and categories listings are all separated based on whether they are in the member section, and each shows a different sidebar. This sidebar has items based on whether or not one is in the member section. The search functionality also had to be separated, so that a Member search would not produce a regular Post result, and vice versa. The Search template therefore also had to be customized. --- archive.php | 39 ++++---- css/app.css | 82 ++++++++++------ functions.php | 141 +++++++++++++++++++++++++++ glm-members-only-template.php | 1 + home.php | 37 +++++-- parts/blog-addthis-wrapper.php | 10 ++ parts/blog-archive-content.php | 30 +++++- parts/blog-sidebar-members-only.php | 45 +++++---- parts/blog-sidebar-r.php | 15 +-- parts/blog-single-content.php | 55 +++++++++++ parts/client-info-footer.php | 2 +- parts/glm-members-only-blog-feed.php | 40 ++++++++ parts/members-sidebar.php | 3 +- parts/search-content.php | 110 +++++++++++++++++++++ scss/_blog.scss | 18 +++- scss/_copyright.scss | 1 + scss/_main.scss | 10 +- scss/plugins/_glm-member-db.scss | 11 ++- search.php | 116 +++------------------- single.php | 92 +++-------------- 20 files changed, 569 insertions(+), 289 deletions(-) create mode 100644 parts/blog-addthis-wrapper.php create mode 100644 parts/blog-single-content.php create mode 100644 parts/glm-members-only-blog-feed.php create mode 100644 parts/search-content.php diff --git a/archive.php b/archive.php index 19aea22..71e8ee6 100644 --- a/archive.php +++ b/archive.php @@ -6,29 +6,28 @@
+ if ( get_query_var( 'cat' ) ) { + $category = get_category( get_query_var( 'cat' ) ); + } ?> - slug == 'members-only' ) { ?> - - -
- - -
- - - - - - - + slug == 'members-only' ) || ( ( isset( $_GET["post_type"] ) ) && ( "member_post" == $_GET["post_type"] ) ) ) { ?> + +
+
- - -
+ + + + + + + +
+ +
+ + diff --git a/css/app.css b/css/app.css index e8a3cad..f0994fa 100644 --- a/css/app.css +++ b/css/app.css @@ -7025,7 +7025,7 @@ main .blocks .block-thumb-wrap { max-height: 170px; } } main .blocks .block { margin-bottom: 80px; - transition: all 0.2s ease in out; } + transition: all 0.2s ease-in-out; } main .blocks .block img { border: none; padding: 0; } @@ -7070,23 +7070,25 @@ main.page-front { main.page-front { margin: 0 auto; } } main.page-front #main-content { - margin-top: 25px; } - main.page-front #main-content h1 { - padding: 0; - width: 100%; - display: block; - text-align: center; - font-weight: 600; - font-size: 21px; - line-height: 40px; - letter-spacing: 2px; - text-transform: uppercase; - color: #212121; - font-family: "ingram-wide-2"; } - main.page-front #main-content p { - color: #888888; - font-family: "ingram-wide-2"; - font-size: 18px; } + margin-top: 25px; + /* h1 { + padding: 0; + width: 100%; + display: block; + text-align: center; + font-weight: 600; + font-size: 21px; + line-height: 40px; + letter-spacing: 2px; + text-transform: uppercase; + color: #212121; + font-family: "ingram-wide-2"; + }*/ + /* p { + color: $dark-grey; + font-family: "ingram-wide-2"; + font-size: 18px; + }*/ } main.page-front #mid { background: url(../assets/central-swing-full-image.jpg); background-size: cover; @@ -7679,39 +7681,46 @@ 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 { +body main.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 { + body main.members-only-template #menu-side h2 a:hover { border-bottom: 1px solid white; } -body .members-only-template #side-links { +body main.members-only-template #side-links { background-color: #b32024; border: 1px solid #ffc742; border-radius: 5px; color: #ffc742; list-style: outside none none; padding: 20px; } -body .members-only-template #menu-members-only-menu { +body main.members-only-template #menu-members-only-menu { list-style: outside none none; } -body .members-only-template #side-links h2 { +body main.members-only-template #side-links h2 { color: #FFFFFF; } -body .members-only-template #side-links li { +body main.members-only-template #side-links li { line-height: 1; margin-bottom: 10px; } -body .members-only-template #side-links li a { +body main.members-only-template #side-links li a { color: #FFFFFF; text-decoration: none; font-size: 18px; } -body .members-only-template #side-links li a:hover { +body main.members-only-template #side-links li a:hover { color: #ffc742; border-bottom: 1px solid #ffc742; } +body main.members-only-template .blocks .block { + margin-bottom: 50px; } +body main.members-only-template .blog-feed-post { + margin-bottom: 20px; } 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; } + @media only screen and (min-width:0em) and (max-width:64em) { + body #glm-member-front-header .glm-button.button { + clear: right; } } body #glm-member-front-header .glm-member-greeting { float: left; padding: 6px; } @@ -7875,13 +7884,17 @@ body #glm-member-front-header .button.glm-button { color: #FFFFFF; } #blog-posts-over article { - padding-top: 10px; - margin-bottom: 15px; + padding-top: 0; + margin-bottom: 25px; display: inline-block; - width: 100%; } + width: 100%; + font-size: 16px; + line-height: 1.5; } + #blog-posts-over article h1 { + line-height: 1; } #blog-posts-over article p { padding-bottom: 15px; - font-size: 18px; } + font-size: 16px; } #blog-posts-over article a.read-more { color: #FFFFFF; background: #ffc742; @@ -7902,6 +7915,10 @@ body #glm-member-front-header .button.glm-button { font-size: 0.75rem; color: #939598; margin: 0 0 12px; } + #blog-posts-over article hr.contentBreak { + margin: 5px 0; } + #blog-posts-over article .blog-feed-imgs img { + border-radius: 2px; } #blog-posts-over.ai1ec-post article { /*background-color: rgba(255, 140,140, 0.2);*/ @@ -7917,7 +7934,7 @@ body #glm-member-front-header .button.glm-button { color: #757575; font-size: 12px; } -.blog-home #blog-posts-over > div { +.blog-archive #blog-posts-over > div, .blog-home #blog-posts-over > div { margin: 25px 0; } #blog-side-info { @@ -8288,7 +8305,8 @@ img#orb-foot { font-size: 0.75rem; } #copyright a { color: lightgrey; - text-decoration: underline; } + text-decoration: underline; + font-size: 0.875rem; } #footer_address span.bullet, #copyright span.bullet { margin: 0 5px; } diff --git a/functions.php b/functions.php index 7f6fa3b..bcac5a4 100644 --- a/functions.php +++ b/functions.php @@ -561,4 +561,145 @@ add_action( 'after_setup_theme', 'woocommerce_support' ); function woocommerce_support() { add_theme_support( 'woocommerce' ); } + +define( 'POST_TYPE', 'member_post' ); +define( 'MEMBER_POST_SINGLE', 'Member Post' ); +define( 'MEMBER_POST_PLURAL', 'Member Posts' ); +define( 'TEXT_DOMAIN', 'tc_member_posts' ); +define( 'CATEGORY_NAME', 'Member Post Category' ); +define( 'CATEGORY_SLUG', 'member-post-category' ); +define( 'CATEGORY_SINGLE', 'Member Post Category' ); +define( 'CATEGORY_PLURAL', 'Member Post Categories' ); + +// Add images sizes for the CPT +add_image_size( 'memberPostSize', '395', '258', true ); + +// Register Custom Post Type +/** + * troutcreek_custom_post_type + * + * @access public + * @return void + */ +function member_post_custom_post_type() +{ + + $labels = array( + 'name' => _x( MEMBER_POST_PLURAL, 'Post Type General Name', TEXT_DOMAIN ), + 'singular_name' => _x( MEMBER_POST_SINGLE, 'Post Type Singular Name', TEXT_DOMAIN ), + 'menu_name' => __( MEMBER_POST_PLURAL, TEXT_DOMAIN ), + 'name_admin_bar' => __( MEMBER_POST_PLURAL, TEXT_DOMAIN ), + 'archives' => __( MEMBER_POST_PLURAL, TEXT_DOMAIN ), + 'attributes' => __( MEMBER_POST_SINGLE . ' Attributes', TEXT_DOMAIN ), + 'parent_item_colon' => __( 'Parent ' . MEMBER_POST_SINGLE . ':', TEXT_DOMAIN ), + 'all_items' => __( 'All ' . MEMBER_POST_PLURAL, TEXT_DOMAIN ), + 'add_new_item' => __( 'Add New ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'add_new' => __( 'Add New ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'new_item' => __( 'New ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'edit_item' => __( 'Edit ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'update_item' => __( 'Update ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'view_item' => __( 'View ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'view_items' => __( 'View ' . MEMBER_POST_PLURAL, TEXT_DOMAIN ), + 'search_items' => __( 'Search ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'not_found' => __( 'Not found', TEXT_DOMAIN ), + 'not_found_in_trash' => __( 'Not found in Trash', TEXT_DOMAIN ), + 'featured_image' => __( 'Member Post Image', TEXT_DOMAIN ), + 'set_featured_image' => __( 'Set member post image', TEXT_DOMAIN ), + 'remove_featured_image' => __( 'Remove member post image', TEXT_DOMAIN ), + 'use_featured_image' => __( 'Use as member post image', TEXT_DOMAIN ), + 'insert_into_item' => __( 'Insert into ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'uploaded_to_this_item' => __( 'Uploaded to this ' . MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'items_list' => __( MEMBER_POST_PLURAL . ' list', TEXT_DOMAIN ), + 'items_list_navigation' => __( MEMBER_POST_PLURAL . ' list navigation', TEXT_DOMAIN ), + 'filter_items_list' => __( 'Filter items list', TEXT_DOMAIN ), + ); + $args = array( + 'label' => __( MEMBER_POST_SINGLE, TEXT_DOMAIN ), + 'description' => __( 'Custom', MEMBER_POST_PLURAL ), + 'labels' => $labels, + 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'thumbnails','post-thumbnails', 'page-attributes' ), + 'taxonomies' => array( CATEGORY_SLUG ), + 'hierarchical' => false, + 'public' => false, + 'show_ui' => true, + 'show_in_menu' => true, + 'menu_position' => 5, + 'show_in_admin_bar' => true, + 'show_in_nav_menus' => true, + 'can_export' => true, + 'has_archive' => true, + 'exclude_from_search' => false, + 'publicly_queryable' => true, + 'capability_type' => 'page', + ); + register_post_type( POST_TYPE, $args ); + register_taxonomy_for_object_type( CATEGORY_NAME, POST_TYPE ); + +} +add_action( 'init', 'member_post_custom_post_type', 0 ); +/** + * member_post_taxonomies + * + * @access public + * @return void + */ +function member_post_taxonomies() +{ + + // Categories + $labels = array( + 'name' => _x( CATEGORY_NAME, 'taxonomy general name' ), + 'singular_name' => _x( CATEGORY_NAME, 'taxonomy singular name' ), + 'search_items' => __( 'Search ' . CATEGORY_PLURAL), + 'all_items' => __( 'All ' . CATEGORY_PLURAL), + 'parent_item' => __( 'Parent ' . CATEGORY_SINGLE), + 'parent_item_colon' => __( 'Parent ' . CATEGORY_SINGLE), + 'edit_item' => __( 'Edit ' . CATEGORY_SINGLE), + 'update_item' => __( 'Update ' . CATEGORY_SINGLE), + 'add_new_item' => __( 'Add New ' . CATEGORY_SINGLE), + 'new_item_name' => __( 'New ' . CATEGORY_SINGLE . ' Name' ), + 'menu_name' => __( CATEGORY_SINGLE ), + ); + + $capabilities = array( + 'manage_terms' => 'manage_categories', + 'edit_terms' => 'manage_categories', + 'delete_terms' => 'manage_categories', + 'assign_terms' => 'edit_posts', + ); + + $args = array( + 'label' => __(CATEGORY_PLURAL), + 'rewrite' => array( 'slug' => CATEGORY_SLUG ), + 'capabilities' => $capabilities, + 'public ' => false, + 'show_in_quick_edit' => true, + 'show_in_admin_column' => true, + 'hierarchical' => true + ); + + register_taxonomy( + CATEGORY_SLUG, + POST_TYPE, + $args + ); +} + +add_action( 'init', 'member_post_taxonomies' ); +add_action( 'init', 'member_post_custom_post_type' ); +add_theme_support( 'post-thumbnails', array('member_post') ); + +function template_chooser($template) +{ +// global $wp_query; +// $post_type = get_query_var('searchType'); +// $post_type = 'searchType'; +// if( $wp_query->is_search && 'searchType' == $post_type ) +// { +// return locate_template('search-member-post.php'); // redirect to search-member-post.php +// } + return $template; +} +add_filter('template_include', 'template_chooser'); + ?> diff --git a/glm-members-only-template.php b/glm-members-only-template.php index cd06209..5004982 100644 --- a/glm-members-only-template.php +++ b/glm-members-only-template.php @@ -34,6 +34,7 @@ Template Name: GLM Members Only Template + diff --git a/home.php b/home.php index 248e8d5..1fb9c60 100644 --- a/home.php +++ b/home.php @@ -7,19 +7,40 @@
-
-
> + + ID, 'blog-feed-front'); ?> + + +
+ +
+
+ +
+ + +
> +

-
- + + + + +
+
+ Posted on +
+
@@ -28,9 +49,5 @@
-
- - - - + \ No newline at end of file diff --git a/parts/blog-addthis-wrapper.php b/parts/blog-addthis-wrapper.php new file mode 100644 index 0000000..92a83af --- /dev/null +++ b/parts/blog-addthis-wrapper.php @@ -0,0 +1,10 @@ +
+ +
+ +
+ + + + +
\ No newline at end of file diff --git a/parts/blog-archive-content.php b/parts/blog-archive-content.php index 60b693f..81b4439 100644 --- a/parts/blog-archive-content.php +++ b/parts/blog-archive-content.php @@ -1,18 +1,38 @@
-
-
> + + ID, 'blog-feed-front'); ?> + +
+ +
+
+ +
+ + +
> +

-
- + + + + +
+
+ Posted on +
+
diff --git a/parts/blog-sidebar-members-only.php b/parts/blog-sidebar-members-only.php index 690970d..a583b85 100644 --- a/parts/blog-sidebar-members-only.php +++ b/parts/blog-sidebar-members-only.php @@ -1,41 +1,40 @@
-
+
-
+

Recent Posts

    '5', 'post_status' => 'publish', 'category_name' => 'members-only' ); + + $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'post_type' => 'member_post' ); $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.'
  • '; + 'member-post-category', + 'hide_empty' => false, + ) ); + if ( count($cats) > 0 ) { - } - } - ?> -
-

Archive

-
    'monthly', 'limit' => 12 ) ); ?>
+ ?> +

Categories

+ + +

Archive

+
    'monthly', 'limit' => 12, 'post_type' => 'member_post' ) ); ?>
-
\ No newline at end of file diff --git a/parts/blog-sidebar-r.php b/parts/blog-sidebar-r.php index 540692e..c00ac2d 100644 --- a/parts/blog-sidebar-r.php +++ b/parts/blog-sidebar-r.php @@ -9,7 +9,7 @@
    '5', 'post_status' => 'publish', 'category__not_in' => $members_only_category->term_id ); + $args = array( 'numberposts' => '5', 'post_status' => 'publish', 'post_type' => 'post' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ echo '
  • ' . $recent["post_title"].'
  • '; @@ -19,20 +19,15 @@

    Categories

      'name', - 'order' => 'ASC' - ); - $categories = get_categories($args); + $args = array('orderby' => 'name', 'order' => 'ASC', 'post_type' => 'post' ); + $categories = get_categories($args); foreach($categories as $category) { - if ($category->term_id !== $members_only_category->term_id ) { - echo '
    • name ) . '" ' . '>' . $category->name.'
    • '; - } + echo '
    • name ) . '" ' . '>' . $category->name.'
    • '; } ?>

    Archive

    -
      'monthly', 'limit' => 12 ) ); ?>
    +
      'monthly', 'limit' => 12, 'post_type' => 'post' ) ); ?>
\ No newline at end of file diff --git a/parts/blog-single-content.php b/parts/blog-single-content.php new file mode 100644 index 0000000..cebca5f --- /dev/null +++ b/parts/blog-single-content.php @@ -0,0 +1,55 @@ + +
+
+
+
+
> +
+

+ + + + Posted on +
+ +
+ + + $cat->name, 'slug' => $cat->slug ); +// echo ''. $cat->name .', '; +// } +// } +// $post_tags = wp_get_post_tags( get_the_ID() ); +// $tags = array(); +// if (has_tag( )) { +// echo ' and tagged '; +// foreach($post_tags as $t){ +// $tag = get_tag( $t ); +// $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug ); +// echo ''. $tag->name .', '; +// } +// } +// echo ' on '; +// echo ' ' . the_time('F jS, Y') . ''; +// ?> + + +
+
+
+ + +
+ + +
+

+
+ \ No newline at end of file diff --git a/parts/client-info-footer.php b/parts/client-info-footer.php index cf1ac88..53db9ca 100644 --- a/parts/client-info-footer.php +++ b/parts/client-info-footer.php @@ -46,7 +46,7 @@ | Contact Us - | Members Only + | Members Only
diff --git a/parts/glm-members-only-blog-feed.php b/parts/glm-members-only-blog-feed.php new file mode 100644 index 0000000..1fd7c19 --- /dev/null +++ b/parts/glm-members-only-blog-feed.php @@ -0,0 +1,40 @@ + array(1), + 'posts_per_page' => -1, //showposts is deprecated + 'orderby' => 'date' //You can specify more filters to get the data +); + + +?> + '5', 'post_status' => 'publish', 'category_name' => 'members-only' ); +$lastposts = get_posts( $args ); +if ($lastposts) { ?> + +
+
+ + +
+ ID, 'blog-feed-front'); ?> + +
+ + post shadow +
+
+ +
+ +

+

ID); ?>

+

+
+
+ +
+
+ diff --git a/parts/members-sidebar.php b/parts/members-sidebar.php index a73e598..fe133f9 100644 --- a/parts/members-sidebar.php +++ b/parts/members-sidebar.php @@ -6,6 +6,5 @@ - -

True North News

+

">True North News

\ No newline at end of file diff --git a/parts/search-content.php b/parts/search-content.php new file mode 100644 index 0000000..47d8ff1 --- /dev/null +++ b/parts/search-content.php @@ -0,0 +1,110 @@ + + +

Please enter a query in the search box.

+ +

Search Results for ""

+
+ + + + post_type=='page') || ($post->post_type=='member_post'))) { + continue; + } ?> + post_type=='page') || ($post->post_type=='post'))) { + continue; + } ?> +
+
+
> +
+

+ Posted on +
+ + + + @'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : ''); + + // Search content for terms + $terms = $wp_query->query_vars['search_terms']; + if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) { + $padding = max($min_padding, $max_length / (2*count($matches[0]))); + + // Construct extract containing context for each term + $output = ''; + $last_offset = 0; + foreach ( $matches[0] as $match ) { + list($string, $offset) = $match; + $start = $offset-$padding; + $end = $offset+strlen($string)+$padding; + // Preserve whole words + while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--; + while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++; + $start = max($start, $last_offset); + $context = substr($content, $start, $end-$start); + if ( $start > $last_offset ) $context = '...'.$context; + $output .= $context; + $last_offset = $end; + } + + if ( $last_offset != strlen($content)-1 ) $output .= '...'; + } else { + $output = $content; + } + + if ( strlen($output) > $max_length ) { + $end = $max_length-3; + while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--; + $output = substr($output, 0, $end) . '...'; + } + + // Highlight matches + $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '$0', $output)); + ?> + +

+ +

+

+ Read this entry +

+ + + +
+ $cat->name, 'slug' => $cat->slug ); + echo ', '. $cat->name .''; + } + echo '.'; + } + ?> +
+
+
+
+ + + +
+

+
+ +
+ \ No newline at end of file diff --git a/scss/_blog.scss b/scss/_blog.scss index 4dcaacd..04a2f03 100644 --- a/scss/_blog.scss +++ b/scss/_blog.scss @@ -192,13 +192,18 @@ } } #blog-posts-over article { - padding-top: 10px; - margin-bottom: 15px; + padding-top: 0; + margin-bottom: 25px; display: inline-block; width: 100%; + font-size: 16px; + line-height: 1.5; + h1 { + line-height: 1; + } p { padding-bottom: 15px; - font-size: 18px; + font-size: 16px; } a.read-more { color: $white; @@ -225,6 +230,12 @@ margin: 0 0 12px; } } + hr.contentBreak { + margin: 5px 0; + } + .blog-feed-imgs img { + border-radius: 2px; + } } #blog-posts-over.ai1ec-post article { /*background-color: rgba(255, 140,140, 0.2);*/ @@ -240,6 +251,7 @@ color: #757575; font-size: 12px; } +.blog-archive #blog-posts-over > div, .blog-home #blog-posts-over > div { margin: 25px 0; } diff --git a/scss/_copyright.scss b/scss/_copyright.scss index 5a488f1..584a036 100644 --- a/scss/_copyright.scss +++ b/scss/_copyright.scss @@ -12,6 +12,7 @@ a { color: lightgrey; text-decoration: underline; + font-size: rem-calc(14); } } #footer_address span.bullet, diff --git a/scss/_main.scss b/scss/_main.scss index f1880da..6833362 100644 --- a/scss/_main.scss +++ b/scss/_main.scss @@ -54,7 +54,7 @@ main { } .block { margin-bottom: 80px; - transition: all .2s ease in out; + transition: all .2s ease-in-out; img { border: none; padding: 0; @@ -116,7 +116,7 @@ main { } #main-content { margin-top: 25px; - h1 { +/* h1 { padding: 0; width: 100%; display: block; @@ -128,12 +128,12 @@ main { text-transform: uppercase; color: #212121; font-family: "ingram-wide-2"; - } - p { + }*/ +/* p { color: $dark-grey; font-family: "ingram-wide-2"; font-size: 18px; - } + }*/ } #mid { background: url(../assets/central-swing-full-image.jpg); diff --git a/scss/plugins/_glm-member-db.scss b/scss/plugins/_glm-member-db.scss index 3b96b24..bdba5c9 100644 --- a/scss/plugins/_glm-member-db.scss +++ b/scss/plugins/_glm-member-db.scss @@ -175,7 +175,7 @@ body { text-decoration: underline; } } -.members-only-template { +main.members-only-template { #menu-side h2 a { color: white; font-size: 1.875rem; @@ -211,6 +211,12 @@ body { color: $gold; border-bottom: 1px solid $gold; } + .blocks .block { + margin-bottom: 50px; + } + .blog-feed-post { + margin-bottom: 20px; + } } #glm-member-front-header { border-bottom: 1px solid lightgrey; @@ -219,6 +225,9 @@ body { } #glm-member-front-header .glm-button.button { background-color: $red; + @media #{$medium-down} { + clear: right; + } } #glm-member-front-header .glm-member-greeting { float: left; diff --git a/search.php b/search.php index 7a4f232..161e354 100644 --- a/search.php +++ b/search.php @@ -3,109 +3,23 @@
-
- -

Please enter a query in the search box.

- -

Search Results for ""

-
- - post_type=='page')) continue; ?> -
-
-
> -
-

- Posted on -
- - - - @'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : ''); - - // Search content for terms - $terms = $wp_query->query_vars['search_terms']; - if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) { - $padding = max($min_padding, $max_length / (2*count($matches[0]))); - - // Construct extract containing context for each term - $output = ''; - $last_offset = 0; - foreach ( $matches[0] as $match ) { - list($string, $offset) = $match; - $start = $offset-$padding; - $end = $offset+strlen($string)+$padding; - // Preserve whole words - while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--; - while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++; - $start = max($start, $last_offset); - $context = substr($content, $start, $end-$start); - if ( $start > $last_offset ) $context = '...'.$context; - $output .= $context; - $last_offset = $end; - } - - if ( $last_offset != strlen($content)-1 ) $output .= '...'; - } else { - $output = $content; - } - - if ( strlen($output) > $max_length ) { - $end = $max_length-3; - while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--; - $output = substr($output, 0, $end) . '...'; - } - - // Highlight matches - $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '$0', $output)); - ?> - -

- -

-

- Read this entry -

- - - -
- $cat->name, 'slug' => $cat->slug ); - echo ', '. $cat->name .''; - } - echo '.'; - } - ?> -
-
+ + +
+ +
+ + + + + +
+
- - - -
-

-
- -
- + + +
diff --git a/single.php b/single.php index d25a41e..f32e935 100644 --- a/single.php +++ b/single.php @@ -3,84 +3,24 @@
-
- - '; - } else { - echo '
'; - - } - ?> -
- -
- -
- - - - -
- -
-
-
-
-
> -
-

- -
- - - - $cat->name, 'slug' => $cat->slug ); - echo ''. $cat->name .', '; - } - } -// $post_tags = wp_get_post_tags( get_the_ID() ); -// $tags = array(); -// if (has_tag( )) { -// echo ' and tagged '; -// foreach($post_tags as $t){ -// $tag = get_tag( $t ); -// $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug ); -// echo ''. $tag->name .', '; -// } -// } -// echo ' on '; -// echo ' ' . the_time('F jS, Y') . ''; -// ?> - -
-
-
+ +
+ + +
- - + + + + + +
+ +
- - -
-

-
- -
- - + +
-- 2.17.1