Upload header.php via GUI
This commit is contained in:
@@ -7,6 +7,8 @@
|
|||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
|
|
||||||
<header id="masthead" class="site-header">
|
<header id="masthead" class="site-header">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header-main">
|
<div class="header-main">
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- NAVIGATION START -->
|
<!-- NAVIGATION START -->
|
||||||
<nav id="site-navigation" class="main-navigation">
|
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e('Hauptmenü','minecraft-modern-theme'); ?>">
|
||||||
<!-- Mobile Toggle Button -->
|
<!-- Mobile Toggle Button -->
|
||||||
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
|
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
|
||||||
<i class="fas fa-bars"></i>
|
<i class="fas fa-bars"></i>
|
||||||
@@ -36,9 +38,9 @@
|
|||||||
<?php
|
<?php
|
||||||
wp_nav_menu( array(
|
wp_nav_menu( array(
|
||||||
'theme_location' => 'primary',
|
'theme_location' => 'primary',
|
||||||
'container' => false, // Wichtig: Kein Div-Wrapper drumherum
|
'container' => false,
|
||||||
'menu_class' => 'primary-menu', // Unsere CSS Klasse
|
'menu_class' => 'primary-menu',
|
||||||
'fallback_cb' => false, // Kein Fallback anzeigen
|
'fallback_cb' => false,
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -47,11 +49,10 @@
|
|||||||
<div class="header-info">
|
<div class="header-info">
|
||||||
<div class="social-links">
|
<div class="social-links">
|
||||||
<?php
|
<?php
|
||||||
// Array mit den Social-Media-Plattformen und ihren Font Awesome Klassen
|
|
||||||
$social_icons = array(
|
$social_icons = array(
|
||||||
'discord' => 'fab fa-discord',
|
'discord' => 'fab fa-discord',
|
||||||
'youtube' => 'fab fa-youtube',
|
'youtube' => 'fab fa-youtube',
|
||||||
'twitter' => 'fab fa-x-twitter', // Neues Icon für Twitter/X
|
'twitter' => 'fab fa-x-twitter',
|
||||||
'facebook' => 'fab fa-facebook-f',
|
'facebook' => 'fab fa-facebook-f',
|
||||||
'instagram' => 'fab fa-instagram',
|
'instagram' => 'fab fa-instagram',
|
||||||
'tiktok' => 'fab fa-tiktok',
|
'tiktok' => 'fab fa-tiktok',
|
||||||
@@ -65,17 +66,14 @@
|
|||||||
'spotify' => 'fab fa-spotify'
|
'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 ) ) {
|
||||||
// Wenn ja, Link und Icon ausgeben
|
echo '<a href="' . esc_url( get_theme_mod( 'social_' . $key ) ) . '" target="_blank" rel="noopener"><i class="' . esc_attr( $class ) . '"></i></a>';
|
||||||
echo '<a href="' . esc_url(get_theme_mod('social_' . $key)) . '" target="_blank"><i class="' . esc_attr($class) . '"></i></a>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- .header-main -->
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
Reference in New Issue
Block a user