-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.php
50 lines (44 loc) · 2.51 KB
/
content.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
use Inc\Utils\TemplateUtils as Utils;
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( array('group', 'grid-item') ); ?>>
<div class="post-inner post-hover">
<div class="post-thumbnail" <?php if( get_post_type( $post ) == 'podcast' ) { echo "style=\"display:inline-block;\""; } ?> >
<a href="<?php the_permalink(); ?>" class="<?php echo $post->post_type; ?>-search-result" title="<?php echo wp_strip_all_tags(the_title('','',false)); ?>">
<?php
if ($post->post_type == 'sd_cpt_event') {
$img_url = wp_strip_all_tags(Utils::get_value_by_language($post->sd_data['headerPictureUrl']));
echo '<img src="'.$img_url.'" class="attachment-thumb-medium size-thumb-medium wp-post-image sd-event-search-result" loading="lazy" sizes="(max-width: 520px) 100vw, 520px" width="520" height="245">';
} elseif( get_post_type( $post ) == 'podcast' ) {
echo get_the_post_thumbnail($post, array(512, 512), array( 'class' => '', 'style' => '' ) );
} else { ?>
<?php hu_the_post_thumbnail('thumb-medium'); ?>
<?php if ( has_post_format('video') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-play"></i></span>'; ?>
<?php if ( has_post_format('audio') && !is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-volume-up"></i></span>'; ?>
<?php if ( is_sticky() ) echo'<span class="thumb-icon"><i class="fa fa-star"></i></span>'; ?>
<?php
}
?>
</a>
<?php if ( comments_open() && ( hu_is_checked( 'comment-count' ) ) ): ?>
<a class="post-comments" href="<?php comments_link(); ?>"><span><i class="fa fa-comments-o"></i><?php comments_number( '0', '1', '%' ); ?></span></a>
<?php endif; ?>
</div><!--/.post-thumbnail-->
<div class="post-meta group">
<?php /* Leaving vanilla hueman 3.3.4 content.php */ ?>
<?php if(!has_category('betriebe')) { ?>
<p class="post-category"><?php the_category(' / '); ?></p>
<?php } ?>
<?php /* Reentering vanilla hueman 3.3.4 content.php */ ?>
<?php get_template_part('parts/post-list-author-date'); ?>
</div><!--/.post-meta-->
<h2 class="post-title entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo wp_strip_all_tags(the_title('', '', false)); ?>"><?php the_title(); ?></a>
</h2><!--/.post-title-->
<?php if (hu_get_option('excerpt-length') != '0'): ?>
<div class="entry excerpt entry-summary">
<?php the_excerpt(); ?>
</div><!--/.entry-->
<?php endif; ?>
</div><!--/.post-inner-->
</article><!--/.post-->