From 741c51d448118bf2dfa7ca4290c227ff58bea07a Mon Sep 17 00:00:00 2001 From: NIU Administrator Date: Fri, 13 Nov 2020 15:55:38 +0900 Subject: [PATCH] support to show static page in category archive page. --- category.php | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 11 +++++ 2 files changed, 147 insertions(+) create mode 100644 category.php diff --git a/category.php b/category.php new file mode 100644 index 0000000..9b9b2e8 --- /dev/null +++ b/category.php @@ -0,0 +1,136 @@ +query_vars['post_type']) { + $postType = $wp_query->query_vars['post_type']; + } +} ?> + +
+ +
+ +
+ +
+ + display_name; + } + if ( isset($archiveTitle) && $archiveTitle ) { + $archiveTitle = apply_filters( 'biz_vektor_archiveTitCustom', $archiveTitle ); + echo '

'.esc_html( $archiveTitle ).'

'; + } +/*-------------------------------------------*/ +/* Archive description +/*-------------------------------------------*/ + if ( is_category() || is_tax() || is_tag() ) { + $category_description = term_description(); + $page = get_query_var( 'paged', 0 ); + if ( ! empty( $category_description ) && $page == 0 ) { + echo '
' . $category_description . '
'; + } + } + ?> + get_queried_object(); + $post = get_page_by_path('category-'.esc_html($tax_slug->slug)); + if ($post) { + ?> +
+ post_content); + echo str_replace(']]>', ']]>', $content); + ?> +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
+ + + + +
+
+ + + +
+ +
+ + +
+ + + diff --git a/style.css b/style.css index 18b69e4..7dcedbf 100644 --- a/style.css +++ b/style.css @@ -298,3 +298,14 @@ form#searchform input#searchsubmit { margin-bottom: 40px; } +/* category page */ +#content hr.gradient { + margin: 2em 0; + border: 0; + height: 1px; + background-image: linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0); + background-image: -webkit-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0); + background-image: -moz-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0); + background-image: -ms-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0); + background-image: -o-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0); +}