Upload footer.php via GUI

This commit is contained in:
2026-01-09 19:45:45 +00:00
parent 6b8301bff5
commit fab5f1464c

View File

@@ -1,103 +1,103 @@
<footer id="colophon" class="site-footer"> <footer id="colophon" class="site-footer">
<div class="container"> <div class="container">
<!-- 1. OBERER BEREICH: Widgets --> <!-- 1. OBERER BEREICH: Widgets -->
<div class="footer-widgets"> <div class="footer-widgets">
<?php if ( is_active_sidebar( 'footer-1' ) ) : ?> <?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
<div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div> <div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div>
<?php endif; ?> <?php endif; ?>
<?php if ( is_active_sidebar( 'footer-2' ) ) : ?> <?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
<div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div> <div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div>
<?php endif; ?> <?php endif; ?>
<?php if ( is_active_sidebar( 'footer-3' ) ) : ?> <?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
<div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div> <div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<!-- 2. UNTERER BEREICH: Menü, Copyright, Legal --> <!-- 2. UNTERER BEREICH: Menü, Copyright, Legal -->
<div class="footer-bottom-bar"> <div class="footer-bottom-bar">
<div class="footer-left-group"> <div class="footer-left-group">
<!-- Copyright --> <!-- Copyright -->
<div class="site-info"> <div class="site-info">
<?php <?php
$copyright_text = get_theme_mod( 'footer_copyright', '&copy; ' . date('Y') . ' ' . get_bloginfo('name') ); $copyright_text = get_theme_mod( 'footer_copyright', '&copy; ' . date('Y') . ' ' . get_bloginfo('name') );
if ( get_theme_mod('show_footer_credit', true) ) { if ( get_theme_mod('show_footer_credit', true) ) {
$full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit"> $full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit">
<a href="https://m-viper.de" target="_blank" rel="noopener noreferrer"> <a href="https://m-viper.de" target="_blank" rel="noopener noreferrer">
Minecraft Theme by M_Viper Minecraft Theme by M_Viper
</a> </a>
</span>'; </span>';
} else { } else {
$full_footer_text = $copyright_text; $full_footer_text = $copyright_text;
} }
echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>'; echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>';
?> ?>
</div> </div>
<!-- Footer Menü ( falls vorhanden ) --> <!-- Footer Menü ( falls vorhanden ) -->
<?php if ( has_nav_menu( 'footer' ) ) : ?> <?php if ( has_nav_menu( 'footer' ) ) : ?>
<nav class="footer-navigation"> <nav class="footer-navigation">
<?php <?php
wp_nav_menu( wp_nav_menu(
array( array(
'theme_location' => 'footer', 'theme_location' => 'footer',
'menu_class' => 'footer-menu', 'menu_class' => 'footer-menu',
'container' => false, 'container' => false,
'depth' => 1, // Nur eine Ebene 'depth' => 1, // Nur eine Ebene
) )
); );
?> ?>
</nav> </nav>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="footer-right-group"> <div class="footer-right-group">
<!-- Impressum & Datenschutz --> <!-- Impressum & Datenschutz -->
<div class="footer-legal-links"> <div class="footer-legal-links">
<?php <?php
$impressum_url = get_theme_mod('footer_impressum_url'); $impressum_url = get_theme_mod('footer_impressum_url');
$datenschutz_url = get_theme_mod('footer_datenschutz_url'); $datenschutz_url = get_theme_mod('footer_datenschutz_url');
$links = array(); $links = array();
if (!empty($impressum_url)) { if (!empty($impressum_url)) {
$links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>'; $links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>';
} }
if (!empty($datenschutz_url)) { if (!empty($datenschutz_url)) {
$links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>'; $links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>';
} }
if (!empty($links)) { if (!empty($links)) {
echo implode('', $links); // Kein Trennzeichen mehr, da wir Icons haben echo implode('', $links); // Kein Trennzeichen mehr, da wir Icons haben
} }
?> ?>
</div> </div>
</div> </div>
</div> <!-- Ende footer-bottom-bar --> </div> <!-- Ende footer-bottom-bar -->
</div> <!-- Ende Container --> </div> <!-- Ende Container -->
<!-- THEME TOGGLE (Fixiert unten rechts) --> <!-- THEME TOGGLE (Fixiert unten rechts) -->
<button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode"> <button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode">
<div class="theme-toggle-icons"> <div class="theme-toggle-icons">
<svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> <svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
</svg> </svg>
<svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> <svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="5"/> <circle cx="12" cy="12" r="5"/>
<line x1="12" y1="1" x2="12" y2="3"/> <line x1="12" y1="1" x2="12" y2="3"/>
<line x1="12" y1="21" x2="12" y2="23"/> <line x1="12" y1="21" x2="12" y2="23"/>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
<line x1="1" y1="12" x2="3" y2="12"/> <line x1="1" y1="12" x2="3" y2="12"/>
<line x1="21" y1="12" x2="23" y2="12"/> <line x1="21" y1="12" x2="23" y2="12"/>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
</svg> </svg>
</div> </div>
</button> </button>
</footer> </footer>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>
</html> </html>