Hi,
I have just upgraded to 2.1.2. My homepage (themes/default/index.php) isn't working quite right. It displays everything as one column, though the code says two. When I try to customize it and move it to my theme (themes/berlin/index.php), it only displays the homepage text, and loses all the rest of the featured and recent items. Here's the site:
http://www.nineteenthcenturydisability.org/
And the code:
<?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
$tags = get_tags(array('sort' => 'alpha'), 50);
echo tag_cloud($tags, uri('items/browse'));
?>
<?php if (get_theme_option('Display Featured Item') == 1): ?>
<!-- Featured Item -->
<div id="featured-item">
<h2><?php echo __('Featured Item'); ?></h2>
<?php echo random_featured_items(1); ?>
</div><!--end featured-item-->
<?php endif; ?>
<?php if (get_theme_option('Display Featured Collection')): ?>
<!-- Featured Collection -->
<div id="featured-collection">
<h2><?php echo __('Featured Collection'); ?></h2>
<?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') : '4';
set_loop_records('items', get_recent_items($homepageRecentItems));
if (has_loop_records('items')):
?>
<ul class="items-list">
<?php foreach (loop('items') 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 -->
<?php fire_plugin_hook('public_home', array('view' => $this)); ?>
</div><!-- end secondary -->
<?php echo foot(); ?>
Should I still be saving my index.php file at the root of my theme? Is the index.php file still the one that controls the theme?
Thanks so much!
Karen