Skip to content

Commit

Permalink
cat hide
Browse files Browse the repository at this point in the history
  • Loading branch information
tronsymphony committed Nov 22, 2023
1 parent 250eea2 commit b12d29c
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 28 deletions.
2 changes: 1 addition & 1 deletion assets/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/main.css.map

Large diffs are not rendered by default.

30 changes: 29 additions & 1 deletion assets/scss/partials/_singular.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,29 @@ img.wprm-comment-rating {
z-index: 1;
}

&.inner-hero-alternate-style {
padding: 40px 0 0;
min-height: 0;
background-color: white;

.inner-hero-container {
padding: 0;
}

&:after {
display: none;
}

.title {
// margin: 0;
color: black;
}

.subtitle {
color: black;
}
}

&.inner-hero-center-text {
text-align: center;

Expand Down Expand Up @@ -1152,7 +1175,7 @@ img.wprm-comment-rating {
flex-wrap: wrap;
align-items: center;
gap: 20px;


.avatar {
border-radius: 50%;
Expand Down Expand Up @@ -1216,9 +1239,11 @@ img.wprm-comment-rating {

align-items: center;
gap: 8px;

@include media(">tablet") {
gap: 20px;
}

@include media("<tablet") {
flex-wrap: wrap;
}
Expand All @@ -1227,6 +1252,7 @@ img.wprm-comment-rating {
border-radius: 50%;
width: 45px;
height: 45px;

@include media("<tablet") {
width: 30px;
height: 30px;
Expand Down Expand Up @@ -1305,6 +1331,7 @@ img.wprm-comment-rating {
display: flex;
gap: 20px;
align-items: center;

@include media("<tablet") {
gap: 8px;
}
Expand All @@ -1315,6 +1342,7 @@ img.wprm-comment-rating {
width: 45px;
height: 45px;
max-width: 45px;

@include media("<tablet") {
width: 30px;
height: 30px;
Expand Down
12 changes: 12 additions & 0 deletions inc/layouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,17 @@ function eqd_single_fullwidth_content() {
echo '</br>';}
?>


<?php
$term_list = wp_get_post_terms(get_the_ID(), 'category', ['fields' => 'all']);
foreach($term_list as $term) {
if( get_post_meta(get_the_ID(), '_yoast_wpseo_primary_category',true) == $term->term_id ) {
$hide_editorial_section_on_posts = get_field( 'hide_editorial_section_on_posts', 'category_' . $term->term_id );
}
}

if ( !$hide_editorial_section_on_posts ) :
?>
<section class="site-main-article__author-data-editorial_statement">
<div class="site-main-article__author-data-editorial_statement-container">
<div class="site-main-article__author-data-editorial_statement-container__title">
Expand All @@ -346,6 +357,7 @@ function eqd_single_fullwidth_content() {
</div>
</div>
</section>
<?php endif; ?>

<div class="site-main-article__author-data <?php if( !empty(get_field( 'post_editor', get_the_ID() )) ){ echo "site-main-article__author-data_editor"; } ?>">
<div class="auth-editor-container">
Expand Down
60 changes: 35 additions & 25 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ function eqd_tha_page_header() {
$container_class .= ' inner-hero-center-text';
}

$alternate_header_style = get_field( 'alternate_header_style' );
if ( $alternate_header_style ) {
$container_class .= 'inner-hero-alternate-style';
}
?>
<header class="inner-hero <?php echo wp_kses_post( $container_class ); ?>">
<div class="inner-hero-container">
Expand Down Expand Up @@ -340,37 +344,43 @@ function eqd_tha_page_header() {
<?php endif; ?>
</h1>

<span class="subtitle">
<?php
if ( ! is_search() ) {
if ( ! empty( $subtitle ) ) {
echo wp_kses_post( $subtitle );
} else {
echo wp_kses_post( get_field( 'title_copy', 'option' ) );
<span class="subtitle">
<?php
if ( ! is_search() ) {
if ( ! empty( $subtitle ) ) {
echo wp_kses_post( $subtitle );
} else {
echo wp_kses_post( get_field( 'title_copy', 'option' ) );
}
}
}
?>
</span>

<?php if ( ! empty( $heading_link ) ) : ?>
<span class="link">
<a href="<?php echo $heading_link['url'] ? $heading_link['url'] : ''; ?>" class="btn btn-dark-bg"><?php echo $heading_link['title'] ? $heading_link['title'] : ''; ?></a>
?>
</span>

<?php if ( !$alternate_header_style ): ?>

<?php if ( ! empty( $heading_link ) ) : ?>
<span class="link">
<a href="<?php echo $heading_link['url'] ? $heading_link['url'] : ''; ?>" class="btn btn-dark-bg"><?php echo $heading_link['title'] ? $heading_link['title'] : ''; ?></a>
</span>
<?php endif; ?>

<?php endif; ?>

</div>

<?php
if ( ! is_search() ) {
if ( ! empty( $bg_url ) ) :
?>
<span class="hero_image">
<img src="<?php echo $bg_url; ?>" alt="<?php the_title(); ?>" />
</span>
<?php
endif;
}
?>
<?php if ( !$alternate_header_style ): ?>
<?php
if ( ! is_search() ) {
if ( ! empty( $bg_url ) ) :
?>
<span class="hero_image">
<img src="<?php echo $bg_url; ?>" alt="<?php the_title(); ?>" />
</span>
<?php
endif;
}
?>
<?php endif; ?>

</header>

Expand Down

0 comments on commit b12d29c

Please sign in to comment.