-
Notifications
You must be signed in to change notification settings - Fork 0
/
portfolio-intro-box.php
32 lines (32 loc) · 1.06 KB
/
portfolio-intro-box.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
<?php
/**
* Portfolio Intro Box
*
*/
if($e404_options['portfolio_intro_type'] != 'none') :
if($e404_options['portfolio_intro_type'] == 'twitter')
$e404_options['portfolio_intro_text'] = '<p>'.$e404_options['portfolio_intro_text'].'</p>';
?>
<div id="intro" class="<?php if($e404_options['portfolio_intro_type'] == 'twitter') echo 'twitter'; else echo 'text'; ?>-intro">
<?php if($e404_options['portfolio_intro_type'] == 'title') : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php rewind_posts(); ?>
<?php elseif($e404_options['portfolio_intro_type'] == 'title-excerpt') : the_post(); ?>
<?php
if(is_tax()) {
$obj = $wp_query->get_queried_object();
echo '<h1>'.$obj->name.'</h1>';
} else { ?>
<h1><?php the_title(); ?></h1>
<?php $excerpt = e404_get_excerpt($post, $e404_options['excerpt_length']);
if($excerpt) : ?>
<p><?php echo $excerpt; ?></p>
<?php endif;
}
rewind_posts(); ?>
<?php else : ?>
<?php echo $e404_options['portfolio_intro_text']; ?>
<?php endif; ?>
<hr class="divider divider-bbottom">
</div>
<?php endif; ?>