fix missing default background image page template, switch to category template for bestand
This commit is contained in:
parent
bc2588f56b
commit
cb83dea89c
4 changed files with 24 additions and 24 deletions
|
|
@ -5,9 +5,9 @@ Template Name: Bestand
|
|||
|
||||
get_header();
|
||||
|
||||
$category_id = get_cat_ID('Bestand');
|
||||
$categories = get_the_category();
|
||||
$args = array(
|
||||
'cat' => $category_id,
|
||||
'cat' => $categories[0]->cat_ID,
|
||||
'orderby' => 'title',
|
||||
'order' => 'ASC',
|
||||
'nopaging' => true,
|
||||
|
|
@ -26,13 +26,21 @@ Template Name: Bestand
|
|||
|
||||
<main>
|
||||
|
||||
<?php
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', 'category' );
|
||||
?>
|
||||
|
||||
<section class="background-color-white category" style="margin-top: -7rem;">
|
||||
<section class="background-color-white category">
|
||||
<div class="content-wrap">
|
||||
<h2>
|
||||
<?php
|
||||
if ( ! empty( $categories ) ) {
|
||||
echo esc_html( $categories[0]->name );
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
$post = get_page_by_path('bestand');
|
||||
$content = apply_filters('the_content', $post->post_content);
|
||||
echo $content;
|
||||
?>
|
||||
|
||||
<div class="tx-indexedsearch">
|
||||
|
||||
|
|
@ -71,7 +79,7 @@ Template Name: Bestand
|
|||
<?php
|
||||
|
||||
$args = array(
|
||||
'cat' => $category_id,
|
||||
'cat' => $categories[0]->cat_ID,
|
||||
'orderby' => 'title',
|
||||
'order' => 'ASC',
|
||||
'nopaging' => true,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ get_header();
|
|||
echo esc_html( $categories[0]->name );
|
||||
} ?>
|
||||
</h2>
|
||||
|
||||
|
||||
<div class="tx-indexedsearch">
|
||||
|
||||
<div class="tx-indexedsearch-browsebox">
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
<section class="background-color-white category">
|
||||
<div class="content-wrap">
|
||||
|
||||
<?php the_title( '<h2>', '</h2>' ); ?>
|
||||
|
||||
<article>
|
||||
<?php the_content(); ?>
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -12,9 +12,12 @@ $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() ) { ?>
|
||||
<div class="intro-element align-center background-color-page-theme-contrast" style="background-image: url(<?php echo get_the_post_thumbnail_url(); ?>);">
|
||||
<?php } else { ?>
|
||||
<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);">
|
||||
<div class="intro-element align-center background-color-page-theme-contrast" style="background-image: url(<?php echo get_the_post_thumbnail_url(); ?>);">
|
||||
<?php } else {
|
||||
$custom_logo_id = get_theme_mod( 'kit_defaultimage' );
|
||||
$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
|
||||
?>
|
||||
<div class="intro-element align-center background-color-page-theme-contrast" style="background-image: url(<?php echo esc_url( $logo[0] ); ?>);">
|
||||
<?php } ?>
|
||||
<div class="content-wrap">
|
||||
<?php if ( has_category() ) { ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue