Hi folks,
I'm currently working on this: http://is.gd/7buWW
I've set it up so the reading options dictate that the home page is a static page called 'Home', using a new template called 'CG Homepage' which contains 2 loops and a call to Featured Content Gallery.
The theme was originally Kubrick which I've so far altered 'Header', 'Footer' and 'Page'. The sidebar call is currently commented out until I recode it. I'm not using the stylesheet which came with Kubrick and I'm coding my own.
Now here's the weird thing. I haven't touched the 'Main Index' template at all yet and for some reason it's using the 'CG Homepage' template. I'm guessing it has something to do with how that template is coded.
You can see the blog page here: http://is.gd/7bwIl
Could someone have a look at this and let me know if they can spot anything odd or missing and point me in the right direction? That'd be awesome.
<?php
/**
* @package WordPress
* @subpackage Default_Theme
Template Name: CG Homepage
*/
get_header(); ?>
<div id="content">
<div class="featured_news"><?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?></div>
<div class="news_items">
<div class="latest_news">
<h2>Latest News</h2>
<?php
global $more;
$latest_news = get_posts('numberposts=1');
foreach($latest_news as $post) :
setup_postdata($post);
$more = 0;
?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<small><?php the_time('F jS, Y') ?><!-- | Posted in <?php the_category(', ') ?> --><?php edit_post_link('Edit this entry', ' | ', ''); ?></small>
<div class="entry"><?php the_content("Read the rest of this entry"); ?></div>
</div>
<?php endforeach; ?>
</div>
<div class="recent_news">
<h2>Recent News</h2>
<ul>
<?php
$recent_news = get_posts('numberposts=5&offset=1');
foreach($recent_news as $post) :
setup_postdata($post);
?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div><br class="clear" />
</div>
<?php /* get_sidebar(); */ ?>
<div id="sidebar">
<div class="widget">
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br />
</div>
</div><br class="clear" />
<?php get_footer(); ?>
Cheers,
Robert