Skip to content

Commit

Permalink
Merge pull request #197 from equalizedigital/feature/menu-and-single-…
Browse files Browse the repository at this point in the history
…post

cat
  • Loading branch information
tronsymphony authored Oct 5, 2023
2 parents 8c9266a + 6c97166 commit d2b0ee7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
10 changes: 10 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ function eqd_archive_recommended_post() {
the_post_thumbnail(); // This will output the featured image with default settings
}
?>
<?php
if ( is_tax( 'slp_occupation' ) ) {
$categories = get_the_category();
if ( ! empty( $categories ) ) {
?>
<div class="categories"><?php echo wp_kses_post( $categories[0]->name ); ?></div>
<?php
}
}
?>
</figure>
<div class="date">
<?php echo get_the_date(); // This will output the date the post was published ?>
Expand Down
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.

20 changes: 19 additions & 1 deletion assets/scss/partials/_archive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,25 @@ section.archive_template_recommended_post {

.archive_template_recommended_post_loop_item figure {
max-width: 100%;

position: relative;
.categories {
position: absolute;
top: 0;
right: 0;
z-index: 10;
color: var(--Black, #000);
text-align: center;
font-size: 14px;
font-style: normal;
font-weight: 400;
background: #82BC46;
height: 39px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 12px;
border-radius: 0 10px 0 10px;
}
img {
height: 240px;
border-radius: 10px;
Expand Down

0 comments on commit d2b0ee7

Please sign in to comment.