Upload files to "/"
This commit is contained in:
1 parent
c19e6291ac
commit
9f5faad4aa
5 files changed
+145
No files matched your search
+24
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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
@@ -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>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<?php if (have_posts()) : ?>
|
||||
<?php 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-meta">
|
||||
</div>
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
Reference in new issue
Block a user