added content.php which is supposed to let Urwahl3000 appear as a blogroll.

This commit is contained in:
Willi Junga 2020-12-03 15:30:26 +01:00
parent c7780898b6
commit 315aac6347
Signed by: JunWi
GPG key ID: 16CD94732DE08DA5

95
content.php Normal file
View file

@ -0,0 +1,95 @@
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
<?php
$isExternal = get_post_meta( get_the_ID(), "wpe_feed", true );
$showExcerpt = has_excerpt( get_the_ID() ) || $isExternal;
$target = $isExternal ? '_blank' : '_self';
?>
<?php if ( $showExcerpt ): ?>
<div class="postimglist maybeImgCopyright">
<a href="<?php the_permalink(); ?>" target="<?= $target ?>" class="postimglist-a"><?php
//If it has one, display the thumbnail
$thumbWidth = get_option('thumbnail_size_w', 150);
$thumbHeight = get_option('thumbnail_size_h', 150);
$thumbStyle = 'width:'. $thumbWidth .'px;height:'. $thumbHeight .'px;float:left;margin-right:20px;';
if ( has_post_thumbnail() ):
the_post_thumbnail('thumbnail', array('style' => $thumbStyle));
else:
echo '<img width="'. $thumbWidth .'" height="'. $thumbHeight .'" '
.'src="'. get_stylesheet_directory_uri() .'/images/event-default.jpg" '
.'class="attachment-thumbnail size-thumbnail wp-post-image wp-post-image-default" alt="" '
.'style="'. $thumbStyle .'" />';
endif;
?></a>
<?php $imgcopyright = get_post_meta(get_post_thumbnail_id(), '_copyright', true);
if ($imgcopyright) { ?>
<p class="caption imgCopyright"><?php echo make_clickable($imgcopyright);?></p>
<?php } ?>
</div>
<?php elseif ( has_post_thumbnail() ): ?>
<div class="full-post-image"><?php the_post_thumbnail('titelbild'); ?></div>
<?php endif; ?>
<?php do_action('kr8_content_vor_article_footer'); ?>
<footer class="article-footer">
<?php do_action('kr8_content_im_article_footer1'); ?>
<p class="byline">
<?php if(apply_filters('kr8_content_im_article_byline_tags', true)) { echo get_the_term_list( get_the_ID(), 'post_tag', '<i class="fa fa-tags"></i> ', ', ', '<span style="width:10px;display:inline-block;"></span>' ); } ?>
<?php if(apply_filters('kr8_content_im_article_byline_categories', true)) { echo get_the_term_list( get_the_ID(), 'category', '<i class="fa fa-folder-open"></i> ', ', ', '<span style="width:10px;display:inline-block;"></span>' ); } ?>
<?php if(apply_filters('kr8_content_im_article_byline_date', true)) { the_time('j. F Y'); } ?>
</p>
<?php do_action('kr8_content_im_article_footer2'); ?>
</footer>
<?php do_action('kr8_content_nach_article_footer'); ?>
<?php do_action('kr8_content_vor_article_header'); ?>
<header class="article-header">
<?php do_action('kr8_content_im_article_header1'); ?>
<h1 class="h2"><a href="<?php the_permalink() ?>" target="<?= $target ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
<?php the_title(); ?></a></h1>
<?php do_action('kr8_content_im_article_header2'); ?>
</header>
<?php do_action('kr8_content_nach_article_header'); ?>
<?php do_action('kr8_content_vor_article_content'); ?>
<section class="entry-content">
<?php do_action('kr8_content_im_article_content1'); ?>
<?php
if ( $showExcerpt ):
the_excerpt();
else:
the_content( '<p><a href="'. get_the_permalink() .'" title="'. get_the_title() .'" class="readmore">Weiterlesen »</a></p>' );
endif;
?>
<?php do_action('kr8_content_im_article_content2'); ?>
<?php if ( $showExcerpt ): ?>
<p><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="readmore">Weiterlesen »</a></p>
<?php endif; ?>
<?php do_action('kr8_content_im_article_content3'); ?>
</section>
<?php do_action('kr8_content_nach_article_content'); ?>
</article>