From 67d16058058483e7c6e94dea50fc8880f37eef5d Mon Sep 17 00:00:00 2001 From: Git Manager GUI Date: Thu, 28 May 2026 20:21:41 +0200 Subject: [PATCH] Upload via Git Manager GUI --- template-wiki.php | 167 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 template-wiki.php diff --git a/template-wiki.php b/template-wiki.php new file mode 100644 index 0000000..514c14d --- /dev/null +++ b/template-wiki.php @@ -0,0 +1,167 @@ + 'wiki_category', + 'hide_empty' => false, + 'parent' => 0, + 'orderby' => 'menu_order', + 'order' => 'ASC', +]); +?> + + +
+
+ + +
+
+ $cat): ?> + + +
+ +
+ $cat): + $sub_cats = get_terms([ + 'taxonomy' => 'wiki_category', + 'hide_empty' => false, + 'parent' => $cat->term_id, + 'orderby' => 'menu_order', + 'order' => 'ASC', + ]); + + $direct_articles = new WP_Query([ + 'post_type' => 'bluesky_wiki', + 'posts_per_page' => -1, + 'post_status' => 'publish', + 'orderby' => 'menu_order title', + 'order' => 'ASC', + 'tax_query' => [[ + 'taxonomy' => 'wiki_category', + 'field' => 'term_id', + 'terms' => $cat->term_id, + 'include_children' => false, + ]], + ]); + ?> +
+
+ description): ?> +
description); ?>
+ +
+

name); ?>

+ count); ?> Artikel +
+
+ + have_posts()): ?> +
+

Allgemein

+
+ have_posts()): $direct_articles->the_post(); + $thumb = has_post_thumbnail() + ? get_the_post_thumbnail_url(get_the_ID(), 'thumbnail') + : get_template_directory_uri() . '/images/logo.png'; + $excerpt = get_the_excerpt() ?: wp_trim_words(get_the_content(), 15, '...'); + ?> + +
+ <?php the_title_attribute(); ?> +
+
+

+

+
+
+
+ +
+
+ + + 'bluesky_wiki', + 'posts_per_page' => -1, + 'post_status' => 'publish', + 'orderby' => 'menu_order title', + 'order' => 'ASC', + 'tax_query' => [[ + 'taxonomy' => 'wiki_category', + 'field' => 'term_id', + 'terms' => $sub->term_id, + 'include_children' => false, + ]], + ]); + if (!$sub_articles->have_posts()) { wp_reset_postdata(); continue; } + ?> +
+

name); ?>

+
+ have_posts()): $sub_articles->the_post(); + $thumb = has_post_thumbnail() + ? get_the_post_thumbnail_url(get_the_ID(), 'thumbnail') + : get_template_directory_uri() . '/images/logo.png'; + $excerpt = get_the_excerpt() ?: wp_trim_words(get_the_content(), 15, '...'); + ?> + +
+ <?php the_title_attribute(); ?> +
+
+

+

+
+
+
+ +
+
+ +
+ +
+
+ + + +
+
📚
+

Wiki ist noch leer

+

Erstelle im Backend zuerst Wiki-Kategorien und dann Wiki-Artikel.

+ +
+ + Kategorie erstellen + + Artikel erstellen +
+ +
+ + +
+
+ +