-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-exposant.php
59 lines (57 loc) · 2.22 KB
/
content-exposant.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
51
52
53
54
55
56
57
58
59
<?php
/**
* The default template for displaying exposant.
* Used for both single and index/archive/search.
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
<div class="featured-post">
<?php _e( 'Featured post', 'ssn' ); ?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php if ( is_single() ) : ?>
<strong class="fiche-title">Exposant <?php echo ssn_get_last_year();?></strong><br/>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php else : ?>
<h1 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'ssn' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
</h1>
<?php endif; // is_single() ?>
</header><!-- .entry-header -->
<?php if ( !is_single() ) : // Only display Excerpts for Search ?>
<ul class="entry-themes">
<?php $themes = explode('|', get_the_term_list( $post->ID, 'exposant_theme', '', '|', ''));
foreach($themes as $link_theme) {
echo '<li>'.$link_theme.'</li><br/>';
}
?>
</ul><!-- .entry-themes -->
<div class="entry-summary">
<?php the_excerpt(); ?>
<p><?php edit_post_link( __( 'Edit', 'ssn' ), '<span class="edit-link">', '</span>' ); ?></p>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'ssn' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php
$url_site = get_post_meta($post->ID, SSN_FICHE_META_PREFIX.'site_url', true);
$fiche_email = get_post_meta($post->ID, SSN_FICHE_META_PREFIX.'email', true);
if (!empty($url_site)) {
?><a href="<?php echo $url_site?>" class="fiche-url-site"><?php echo preg_replace('/http:\/\//', '', $url_site);?></a><?php
}
if (!empty($fiche_email)) {
?><span class="fiche-email"><?php echo $fiche_email;?></a><?php
}?>
<?php
if (!is_single()) {?>
<a href="<?php echo get_permalink();?>" class="more-link">En savoir plus</a>
<?php }?>
</footer><!-- .entry-meta -->
</article><!-- #post -->