This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
forked from korbinian/Piratenkleider
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from xwolfde/Piratenkleider3
Piratenkleider3
- Loading branch information
Showing
154 changed files
with
15,178 additions
and
13,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?php | ||
/* | ||
Template Name: Kategorieindex | ||
*/ | ||
?><?php get_header(); | ||
global $options; | ||
|
||
|
||
if ( $options['slider-aktiv'] == "1" ){ ?> | ||
<div class="section teaser"> | ||
<div class="row"> | ||
<?php get_sidebar( 'teaser' ); ?> | ||
</div> | ||
</div> | ||
<?php } ?> | ||
<div class="section content" id="main-content"> | ||
<div class="row"> | ||
<div class="content-primary"> | ||
<div class="skin"> | ||
|
||
|
||
<?php | ||
if ( have_posts() ) while ( have_posts() ) : the_post(); | ||
$content = trim(get_the_content()); | ||
if (strlen($content)>0) { | ||
echo $content; | ||
edit_post_link( __( 'Bearbeiten', 'piratenkleider' ), '', '' ); | ||
echo '<hr class="clear">'; | ||
} | ||
endwhile; | ||
|
||
|
||
$foundarticles=0; | ||
$i = 0; | ||
|
||
global $wp_query; | ||
|
||
|
||
$cat_array = array(); | ||
$categories=get_categories(array('orderby' => 'name','order' => 'ASC')); | ||
foreach($categories as $category) { | ||
if (!is_wp_error( $category )) { | ||
$cat_array[$category->term_id] = $category->term_id; | ||
} | ||
} | ||
|
||
|
||
$num = $options['categoryindex-numlinklist'] + 1; | ||
wp_reset_query(); | ||
$subcatquery = array(); | ||
if ($cat_array) { | ||
foreach($cat_array as $cat) { | ||
$category = get_term_by('ID',$cat, 'category'); | ||
$title = '<h2>' . $category->name.'</h2>'; | ||
|
||
$subcatquery =array( | ||
'post_type' => 'post', | ||
'post_status' => 'publish', | ||
'posts_per_page' => $num, | ||
'cat' => $cat, | ||
'ignore_sticky_posts'=> 1 | ||
); | ||
$i=0; | ||
$my_query = null; | ||
$my_query = new WP_Query($subcatquery); | ||
$liste = ''; | ||
$topentry = ''; | ||
$catfound = 0; | ||
if( $my_query->have_posts() ) { | ||
while ($my_query->have_posts()) : $my_query->the_post(); | ||
$foundarticles =1; | ||
$catfound = 1; | ||
if ($i==0) { | ||
$topentry = piratenkleider_category_teaser($my_query); | ||
$i=1; | ||
} else { | ||
$liste .= '<li><a href="'.get_permalink().'" rel="bookmark">'; | ||
$liste .= get_the_title(); | ||
$liste .= "</a></li>\n"; | ||
} | ||
endwhile; | ||
|
||
if ($catfound==1) { | ||
echo '<div class="categorybox cat-'.$cat.'">'; | ||
echo $title; | ||
echo $topentry; | ||
if (strlen($liste)>0) { | ||
echo '<h3 class="skip">Weitere Artikel aus dem Bereich '.$category->name.'</h3>'; | ||
echo "\n"; | ||
echo '<ul class="catliste">'; | ||
echo $liste; | ||
echo "</ul>\n"; | ||
echo '<p><a href="' . esc_attr(get_term_link($category, 'category')) | ||
. '" title="' . sprintf( __( "Nachrichten der Kategorie %s zeigen" , 'piratenkleider'), $category->name ) | ||
. '" ' . '>'.__('Weitere Meldungen...','piratenkleider').'</a>'.'</p>'; | ||
|
||
} | ||
echo "</div>\n"; | ||
} | ||
|
||
|
||
} | ||
wp_reset_query(); | ||
|
||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
if ($foundarticles==0) { ?> | ||
<h2><?php _e("Nichts gefunden", 'piratenkleider'); ?></h2> | ||
<p> | ||
<?php _e("Es konnten keine Artikel gefunden werden. Bitte versuchen Sie es nochmal mit einer Suche.", 'piratenkleider'); ?> | ||
</p> | ||
<?php get_search_form(); | ||
echo "<hr>\n"; | ||
|
||
} | ||
?> | ||
|
||
</div> | ||
</div> | ||
<div class="content-aside"> | ||
<div class="skin"> | ||
<h1 class="skip"><?php _e( 'Weitere Informationen', 'piratenkleider' ); ?></h1> | ||
<?php get_sidebar(); ?> | ||
</div> | ||
</div> | ||
</div> | ||
<?php get_piratenkleider_socialmediaicons(2); ?> | ||
|
||
</div> | ||
|
||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.