Minecraft-Modern-Theme/functions.php aktualisiert

This commit is contained in:
2025-11-30 13:27:00 +00:00
parent 04424d7f59
commit 76218121a4

View File

@@ -389,3 +389,29 @@ function custom_login_url() { return home_url(); }
add_filter('login_headerurl', 'custom_login_url'); add_filter('login_headerurl', 'custom_login_url');
function custom_login_title() { return get_bloginfo('name'); } function custom_login_title() { return get_bloginfo('name'); }
add_filter('login_headertext', 'custom_login_title'); add_filter('login_headertext', 'custom_login_title');
// =========================================================================
// === SCROLL TO TOP BUTTON ===============================================
// =========================================================================
// Fügt den HTML-Code für den Button zum Footer hinzu
function add_scroll_to_top_button() {
?>
<a href="#" id="scroll-to-top" title="Nach oben scrollen">
<i class="fas fa-chevron-up"></i>
</a>
<?php
}
add_action('wp_footer', 'add_scroll_to_top_button');
// Lädt das JavaScript für den Scroll-to-Top Button
function minecraft_modern_scroll_to_top_script() {
wp_enqueue_script(
'minecraft-scroll-to-top-script',
get_template_directory_uri() . '/js/scroll-to-top.js',
array('jquery'),
'1.0',
true
);
}
add_action('wp_enqueue_scripts', 'minecraft_modern_scroll_to_top_script');