further work on menu and posts

This commit is contained in:
Jonas Heinrich 2020-04-18 19:00:49 +02:00
parent 35b5df405b
commit 98714265b1
3 changed files with 32 additions and 9 deletions

View file

@ -1,3 +1,14 @@
<?php
$kit_categories = get_the_category();
//get name of first category
$kit_category_name = $kit_categories[0]->name;
//get category url
$kit_category_url = get_category_link( $kit_categories[0]->term_id );
?>
<section class="full-width background-color-page-theme" id="c3318">
<?php if ( has_post_thumbnail() ) { ?>
@ -6,6 +17,13 @@
<div class="intro-element align-center background-color-page-theme-contrast" style="background-image: url(/fileadmin/user_upload/00_Startseite/20191216-CN-02-251_Homepage.jpg);">
<?php } ?>
<div class="content-wrap">
<?php if ( has_category() ) { ?>
<a href="<?php echo esc_url( $kit_category_url ); ?>" class="page-category-marker">
<span>
<?php echo esc_html( $kit_category_name ); ?>
</span>
</a>
<?php } ?>
<?php the_title( '<h1>', '</h1>' ); ?>
</div>
</div>