forked from omeka/theme-thanksroy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (48 loc) · 2.09 KB
/
index.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
<?php echo head(array('bodyid'=>'home', 'bodyclass' =>'two-col')); ?>
<div id="primary">
<?php if ($homepageText = get_theme_option('Homepage Text')): ?>
<p><?php echo $homepageText; ?></p>
<?php endif; ?>
<?php if (get_theme_option('Display Featured Item') == 1): ?>
<!-- Featured Item -->
<div id="featured-item">
<?php echo thanksroy_random_featured_item(); ?>
</div><!--end featured-item-->
<?php endif; ?>
<?php if (get_theme_option('Display Featured Collection')): ?>
<!-- Featured Collection -->
<div id="featured-collection">
<?php echo random_featured_collection(); ?>
</div><!-- end featured collection -->
<?php endif; ?>
<?php if ((get_theme_option('Display Featured Exhibit')) && function_exists('exhibit_builder_display_random_featured_exhibit')): ?>
<!-- Featured Exhibit -->
<?php echo exhibit_builder_display_random_featured_exhibit(); ?>
<?php endif; ?>
</div><!-- end primary -->
<div id="secondary">
<!-- Recent Items -->
<div id="recent-items">
<h2><?php echo __('Recently Added Items'); ?></h2>
<?php
$homepageRecentItems = (int)get_theme_option('Homepage Recent Items') ? get_theme_option('Homepage Recent Items') : '3';
set_loop_records('item', get_recent_items($homepageRecentItems));
if (has_loop_records('item')):
?>
<ul class="items-list">
<?php foreach(loop('item') as $item): ?>
<li class="item">
<h3><?php echo link_to_item(); ?></h3>
<?php if($itemDescription = metadata('item', array('Dublin Core', 'Description'), array('snippet'=>150))): ?>
<p class="item-description"><?php echo $itemDescription; ?></p>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<p><?php echo __('No recent items available.'); ?></p>
<?php endif; ?>
<p class="view-items-link"><?php echo link_to_items_browse(__('View All Items')); ?></p>
</div><!-- end recent-items -->
</div><!-- end secondary -->
<?php echo foot(); ?>