-
Notifications
You must be signed in to change notification settings - Fork 0
/
part-featured-pages.php
43 lines (42 loc) · 1.78 KB
/
part-featured-pages.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
<?php $featured_page_count = intval(of_get_option('ttrust_featured_pages_count')); ?>
<?php $featured_pages_title = of_get_option('ttrust_featured_pages_title'); ?>
<?php $featured_pages_links_enabled = of_get_option('ttrust_featured_pages_links_enabled'); ?>
<?php if($featured_page_count > 0) : ?>
<div id="featuredPages" class="full homeSection clearfix">
<?php if($featured_pages_title):?>
<div class="sectionHead">
<h3><span><?php echo $featured_pages_title; ?></span></h3>
<p><span><?php echo of_get_option('ttrust_featured_pages_description'); ?></span></p>
</div>
<?php endif; ?>
<?php
$args = array(
'ignore_sticky_posts' => 1,
'meta_key' => '_ttrust_page_featured',
'meta_value' => true,
'posts_per_page' => $featured_page_count,
'post_type' => array(
'page'
)
);
?>
<?php $pages = new WP_Query( $args ); ?>
<div class="pages thumbs clearfix">
<?php while ($pages->have_posts()) : $pages->the_post(); ?>
<div <?php post_class('small'); ?>>
<div class="inside">
<?php if($featured_pages_links_enabled): ?>
<a class="thumb" href="<?php the_permalink() ?>" rel="bookmark" ><?php the_post_thumbnail("ttrust_one_third_cropped", array('class' => 'thumb', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'')); ?></a>
<a href="<?php the_permalink() ?>" rel="bookmark" ><span class="title"><span><?php the_title(); ?></span></span></a>
<?php the_excerpt(); ?>
<?php else: ?>
<?php the_post_thumbnail("ttrust_one_third_cropped", array('class' => '', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'')); ?>
<span class="title"><span><?php the_title(); ?></span></span>
<?php the_excerpt(); ?>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<?php endif; ?>