From c70b795a28a8f48776589ca63d7f217c70745eea Mon Sep 17 00:00:00 2001 From: briandunnigan Date: Thu, 18 Feb 2016 10:29:35 -0500 Subject: [PATCH] Adding categories to archive/blog page --- archive.php | 20 ++++- css/neag.css | 68 +++++++++++++++ page-blog.php | 218 ++++++++++++++++++++++++++----------------------- sass/neag.scss | 27 ++++++ 4 files changed, 228 insertions(+), 105 deletions(-) diff --git a/archive.php b/archive.php index 9be362e..111f378 100644 --- a/archive.php +++ b/archive.php @@ -98,9 +98,23 @@ get_header(); ?>
- +
diff --git a/css/neag.css b/css/neag.css index a722386..347733b 100644 --- a/css/neag.css +++ b/css/neag.css @@ -10725,6 +10725,47 @@ input[type="button"]#footers.btn-block { border: none; padding: 0; } +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_siteorigin-panels-postloop { + /*Post Loop Widget */ +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_siteorigin-panels-postloop h2 { + margin-top: 12px; + margin-bottom: 12px; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_siteorigin-panels-postloop .content-template-date { + margin-bottom: 10px; + display: block; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_recent-posts { + /*Recent Posts Widget */ +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_recent-posts .post-date { + display: block; + font-size: 11.5px; + margin-top: 5px; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_dpe_fp_widget { + /*Flexible Posts Widget */ +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_dpe_fp_widget li { + margin-bottom: 0px; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_rcpt { + /*Recent Custom Posts Type Widget */ +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_rcpt ul { + padding-left: 0; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_rcpt ul .rcpt_item_title { + padding: 0px; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_rcpt ul .rcpt_item_excerpt { + margin: 0; + margin-top: 10px; +} +#page-page-builder-cards #primary #main .page .entry-content .widget.widget_rcpt ul .rcpt_item_date { + margin-top: 10px; +} #page-page-builder-cards #primary #main .panel-grid { margin-bottom: 0px; margin-left: -5px; @@ -10787,6 +10828,10 @@ body.page-template-page-blank .widget.widget_dpe_fp_widget ul li { margin-bottom: 0px; } +body.home.page-template-page-blank h3.widget-title { + margin-bottom: 15px !important; +} + body { font-family: 'Proxima Nova', helvetica, arial, sans-serif; } @@ -11968,6 +12013,29 @@ body.archive .entry-header h1 a { body.archive .entry-header h1.page-title { font-size: 30px; } +body.archive .post-categories { + list-style-type: none; + padding-left: 0; + margin-top: 15px; +} +body.archive .post-categories li { + float: left; + margin-right: 8px; + margin-bottom: 8px; +} +body.archive .post-categories li a { + color: #2d4e8b; + text-transform: uppercase; + font-size: 10px; + font-weight: 500; + padding: 3px 11px 1px; + background-color: white; + border: 1px solid #2d4e8b; + border-radius: 4px; +} +body.archive .post-categories li a:hover { + background-color: #EAEAEA; +} /* ++++++++++++++++ Blog Continued ++++++++++++++++ */ body.page-template-page-blog .post { diff --git a/page-blog.php b/page-blog.php index abcc3ac..05626bf 100644 --- a/page-blog.php +++ b/page-blog.php @@ -1,103 +1,117 @@ - -
- - - -
-
-
-
- ID; - $authorsStr .= $id.','; - } - $author = rtrim($authorsStr, ','); - } else { - $author = get_user_by('slug', $authornames)->ID; - } - $inTheMediaObj = get_category_by_slug('neag-in-the-media'); - $args = array( - 'post_type' => 'post', - 'category_name' => $cat, - 'cat'=> '-'.$inTheMediaObj->term_id, - 'tag' => $tag, - 'author' => $author, - 'post_status' => 'publish', - 'paged' => get_query_var('paged'), - ); - if( isset($args) ){ - $pattern = '#[a-zA-Z|~`!@\#$%^&*()_+=|\\}\][{\'/;\-":?>.<]#'; - $arr = array('category_name'=>$cat, 'tag'=>$tag, 'author'=>$author); - foreach( $arr as $k=>$v ){ - if( empty($v) ){ - continue; - } - if( $k == 'author' ){ - $pattern = '#[0-9|~`!@\#$%^&*()_+=|\\}\][{\'/;\-":?>.<]#'; - } - if( preg_match($pattern, $v) ){ - $args[$k] = $v; - } else { - echo '

Invalid input in field: "'.$k.'"

'; - } - } - } - query_posts( $args ); - if( have_posts() ): - while( have_posts() ): the_post();?> -
-
- -
-
-

-

-
-
- -
- -
-
- - - - - - - -
-

- -

-
- -
-
-
- -
- - -
+ +
+ + + +
+
+
+
+ ID; + $authorsStr .= $id.','; + } + $author = rtrim($authorsStr, ','); + } else { + $author = get_user_by('slug', $authornames)->ID; + } + $inTheMediaObj = get_category_by_slug('neag-in-the-media'); + $args = array( + 'post_type' => 'post', + 'category_name' => $cat, + 'cat'=> '-'.$inTheMediaObj->term_id, + 'tag' => $tag, + 'author' => $author, + 'post_status' => 'publish', + 'paged' => get_query_var('paged'), + ); + if( isset($args) ){ + $pattern = '#[a-zA-Z|~`!@\#$%^&*()_+=|\\}\][{\'/;\-":?>.<]#'; + $arr = array('category_name'=>$cat, 'tag'=>$tag, 'author'=>$author); + foreach( $arr as $k=>$v ){ + if( empty($v) ){ + continue; + } + if( $k == 'author' ){ + $pattern = '#[0-9|~`!@\#$%^&*()_+=|\\}\][{\'/;\-":?>.<]#'; + } + if( preg_match($pattern, $v) ){ + $args[$k] = $v; + } else { + echo '

Invalid input in field: "'.$k.'"

'; + } + } + } + query_posts( $args ); + if( have_posts() ): + while( have_posts() ): the_post();?> +
+
+ +
+
+

+

+
+
+ +
+
    + name !== 'Uncategorized') + if($category->name !== 'Home-Featured') + if($category->name !== 'News Featured') + { + $output .= '
  • name ) ) . '">'.$category->cat_name.'
  • '.$separator; } + } + echo trim($output, $separator); + } + ?> +
+
+
+ + + + + + + +
+

+ +

+
+ +
+
+
+ +
+ + +
\ No newline at end of file diff --git a/sass/neag.scss b/sass/neag.scss index 7973341..0626eb7 100644 --- a/sass/neag.scss +++ b/sass/neag.scss @@ -1360,6 +1360,33 @@ body.archive { font-size:30px; } } + .post-categories { + list-style-type: none; + padding-left:0; + margin-top:15px; + + li { + float:left; + margin-right:8px; + margin-bottom:8px; + + + a { + color:#2d4e8b; + text-transform: uppercase; + font-size:10px; + font-weight: 500; + padding:3px 11px 1px; + background-color: white; + border:1px solid #2d4e8b; + border-radius:4px; + + &:hover { + background-color:#EAEAEA; + } + } + } + } }