Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index filter #267

Merged
merged 3 commits into from May 9, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -13,27 +13,29 @@
/*-------------------------------------------*/
/* Archive title
/*-------------------------------------------*/
$page_for_posts = lightning_get_page_for_posts();
// Use post top page( Archive title wrap to div )
if ( $page_for_posts['post_top_use'] || get_post_type() != 'post' ) {
$archiveTitle_html = '';
$page_for_posts = lightning_get_page_for_posts();
// Use post top page( Archive title wrap to div ).
if ( $page_for_posts['post_top_use'] || get_post_type() !== 'post' ) {
if ( is_year() || is_month() || is_day() || is_tag() || is_author() || is_tax() || is_category() ) {
$archiveTitle = get_the_archive_title();
$archiveTitle_html = '<header class="archive-header"><h1>' . $archiveTitle . '</h1></header>';
echo wp_kses_post( apply_filters( 'lightning_mainSection_archiveTitle', $archiveTitle_html ) );
}
}
echo wp_kses_post( apply_filters( 'lightning_mainSection_archiveTitle', $archiveTitle_html ) );

/*-------------------------------------------*/
/* Archive description
/*-------------------------------------------*/
$archiveDescription_html = '';
if ( is_category() || is_tax() || is_tag() ) {
$category_description = term_description();
$page = get_query_var( 'paged', 0 );
if ( ! empty( $category_description ) && $page == 0 ) {
$archiveDescription_html = '<div class="archive-meta">' . $category_description . '</div>';
echo wp_kses_post( apply_filters( 'lightning_mainSection_archiveDescription', $archiveDescription_html ) );
$archiveDescription = term_description();
$page_number = get_query_var( 'paged', 0 );
if ( ! empty( $archiveDescription ) && $page_number == 0 ) {
$archiveDescription_html = '<div class="archive-meta">' . $archiveDescription . '</div>';
}
}
echo wp_kses_post( apply_filters( 'lightning_mainSection_archiveDescription', $archiveDescription_html ) );

$postType = lightning_get_post_type();