Upload header.php via GUI

This commit is contained in:
2026-01-09 19:45:47 +00:00
parent 839b1a2e85
commit 23b93ec177

View File

@@ -1,81 +1,79 @@
<!DOCTYPE html> <!DOCTYPE html>
<html <?php language_attributes(); ?>> <html <?php language_attributes(); ?>>
<head> <head>
<meta charset="<?php bloginfo( 'charset' ); ?>"> <meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<?php wp_head(); ?> <?php wp_head(); ?>
</head> </head>
<body <?php body_class(); ?>> <body <?php body_class(); ?>>
<header id="masthead" class="site-header"> <?php wp_body_open(); ?>
<div class="container">
<div class="header-main"> <header id="masthead" class="site-header">
<div class="site-branding"> <div class="container">
<?php <div class="header-main">
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) { <div class="site-branding">
the_custom_logo(); <?php
} if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
?> the_custom_logo();
}
<?php ?>
if ( is_front_page() && is_home() ) :
?> <?php
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> if ( is_front_page() && is_home() ) :
<?php else : ?> ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php endif; ?> <?php else : ?>
</div> <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<!-- NAVIGATION START --> </div>
<nav id="site-navigation" class="main-navigation">
<!-- Mobile Toggle Button --> <!-- NAVIGATION START -->
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"> <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e('Hauptmenü','minecraft-modern-theme'); ?>">
<i class="fas fa-bars"></i> <!-- Mobile Toggle Button -->
</button> <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
<i class="fas fa-bars"></i>
<?php </button>
wp_nav_menu( array(
'theme_location' => 'primary', <?php
'container' => false, // Wichtig: Kein Div-Wrapper drumherum wp_nav_menu( array(
'menu_class' => 'primary-menu', // Unsere CSS Klasse 'theme_location' => 'primary',
'fallback_cb' => false, // Kein Fallback anzeigen 'container' => false,
) ); 'menu_class' => 'primary-menu',
?> 'fallback_cb' => false,
</nav> ) );
<!-- NAVIGATION ENDE --> ?>
</nav>
<div class="header-info"> <!-- NAVIGATION ENDE -->
<div class="social-links">
<?php <div class="header-info">
// Array mit den Social-Media-Plattformen und ihren Font Awesome Klassen <div class="social-links">
$social_icons = array( <?php
'discord' => 'fab fa-discord', $social_icons = array(
'youtube' => 'fab fa-youtube', 'discord' => 'fab fa-discord',
'twitter' => 'fab fa-x-twitter', // Neues Icon für Twitter/X 'youtube' => 'fab fa-youtube',
'facebook' => 'fab fa-facebook-f', 'twitter' => 'fab fa-x-twitter',
'instagram' => 'fab fa-instagram', 'facebook' => 'fab fa-facebook-f',
'tiktok' => 'fab fa-tiktok', 'instagram' => 'fab fa-instagram',
'twitch' => 'fab fa-twitch', 'tiktok' => 'fab fa-tiktok',
'steam' => 'fab fa-steam', 'twitch' => 'fab fa-twitch',
'github' => 'fab fa-github', 'steam' => 'fab fa-steam',
'linkedin' => 'fab fa-linkedin-in', 'github' => 'fab fa-github',
'pinterest' => 'fab fa-pinterest-p', 'linkedin' => 'fab fa-linkedin-in',
'reddit' => 'fab fa-reddit-alien', 'pinterest' => 'fab fa-pinterest-p',
'teamspeak' => 'fab fa-teamspeak', 'reddit' => 'fab fa-reddit-alien',
'spotify' => 'fab fa-spotify' 'teamspeak' => 'fab fa-teamspeak',
); 'spotify' => 'fab fa-spotify'
);
// Schleife, die alle verfügbaren Icons durchgeht
foreach ($social_icons as $key => $class) { foreach ( $social_icons as $key => $class ) {
// Prüfen, ob für diese Plattform eine URL im Customizer hinterlegt wurde if ( get_theme_mod( 'social_' . $key ) ) {
if (get_theme_mod('social_' . $key)) { echo '<a href="' . esc_url( get_theme_mod( 'social_' . $key ) ) . '" target="_blank" rel="noopener"><i class="' . esc_attr( $class ) . '"></i></a>';
// Wenn ja, Link und Icon ausgeben }
echo '<a href="' . esc_url(get_theme_mod('social_' . $key)) . '" target="_blank"><i class="' . esc_attr($class) . '"></i></a>'; }
} ?>
} </div>
?> </div>
</div> </div> <!-- .header-main -->
</div> </div>
</div> </header>
</div>
</header>