Upload files to "/"

This commit is contained in:
ai-bot committed 2026-10-14 08:59:24 +00:00
1 parent 7266b0d4b6
commit 52c4aaabb7
5 files changed
+161

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<?php
get_header();
$author = get_the_author_meta("display_name", get_the_author_meta("ID"));
printf("<h2 class=\"entry-title search\">" . __("Forfatter: ", "textdomain") . $author . "</h2>\n");
if (have_posts()) :
while (have_posts()) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="entry-content">
<?php the_content(); ?>
</div>
</article>
<?php
endwhile;
endif;
get_footer();
?>
+23
View File
@@ -0,0 +1,23 @@
<?php
get_header();
printf("<h2 class=\"entry-title search\">" . __("Kategori: ", "textdomain") . get_queried_object()->name . "</h2>");
if (have_posts()) :
while (have_posts()) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="entry-content">
<?php the_content(); ?>
</div>
</article>
<?php
endwhile;
endif;
get_footer();
?>
+32
View File
@@ -0,0 +1,32 @@
<?php echo do_shortcode('[super_simple_slideshow]'); ?>
<div class="pagination">
<div class="prev"><?php previous_posts_link(__("← Forrige", "textdomain")); ?></div>
<div class="page-numbers">
<?php
the_posts_pagination(array(
"mid_size" => 2,
"prev_text" => false,
"next_text" => false,
));
?>
</div>
<div class="next"><?php next_posts_link(__("Neste →", "textdomain")); ?></div>
</div>
<div class="search-container">
<form role="search" method="get" class="search-form" action="<?php echo home_url("/"); ?>">
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x("Search …", "placeholder", "your-theme-textdomain"); ?>" value="<?php echo get_search_query(); ?>" name="s" />
<button type="submit" class="search-submit"><?php echo esc_html_x("Search", "submit button", "your-theme-textdomain"); ?></button>
</form>
</div>
<footer>
<div class="logo footer-logo">
<a href="<?php echo home_url(); ?>">
<img src="<?php echo get_site_icon_url(); ?>" />
<span><?php bloginfo("name"); ?></span>
</a>
</div>
<div id="logout"><?php add_logout_button(); ?></div>
<div id="org-nr"><p>Org nr. 995 268 698</p></div>
</footer>
</body>
</html>
+54
View File
@@ -0,0 +1,54 @@
<?php
function register_my_menu() {
register_nav_menu("header-menu", __( "Header Menu" ));
}
add_action( "init", "register_my_menu" );
// Vidaresend til innlogging viss ein ikkje er innlogga på forumet
function redirect_to_login_if_not_logged_in() {
if (is_bbpress() && !is_user_logged_in()) {
wp_redirect(wp_login_url(get_permalink()));
exit();
}
}
add_action('template_redirect', 'redirect_to_login_if_not_logged_in');
// Ikkje vis profilsida
function remove_bbpress_profile_page() {
if (function_exists('bbp_is_single_user')) {
if (bbp_is_single_user()) {
//wp_redirect(home_url()); // Omdirigerer til hjemmesiden
wp_redirect(home_url('forums/')); // Omdirigerer til hjemmesiden
exit;
}
}
}
//add_action('template_redirect', 'remove_bbpress_profile_page');
function remove_private_title_prefix($title) {
// Fjern "Privat:" fra tittelen
$title = str_replace('Privat: ', '', $title);
return $title;
}
add_filter('the_title', 'remove_private_title_prefix');
// Logg-ut-knapp
function add_logout_button() {
if (is_user_logged_in()) {
echo '<a href="' . wp_logout_url(home_url()) . '">Logg ut</a>';
}
}
// Change default WordPress email address
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) { return 'info@taubaneforeningen.no'; }
function new_mail_from_name($old) { return 'Norske Tau- og Kabelbaners Forening'; }
//end: Change default WordPress email address
?>
+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo("charset"); ?>">
<title><?php bloginfo("name"); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="<?php bloginfo("stylesheet_url"); ?>" />
<link rel="icon" href="<?php echo get_site_icon_url(); ?>">
</head>
<body>
<header>
<nav>
<div id="nav-grid">
<div class="logo">
<a href="<?php echo home_url(); ?>">
<img src="<?php echo get_site_icon_url(); ?>" />
<span><?php bloginfo("name"); ?></span>
</a>
</div>
<?php
wp_nav_menu( array(
"theme_location" => "header-menu",
"container_class" => "header-menu-class" ) );
?>
</div>
</nav>
</header>