Skip to content

Instantly share code, notes, and snippets.

@fahdi
Forked from slambert/home.php
Created November 30, 2013 22:29
Show Gist options
  • Save fahdi/7725430 to your computer and use it in GitHub Desktop.
Save fahdi/7725430 to your computer and use it in GitHub Desktop.
<?php get_header() ?>
<!-- generated with home.php -->
<div id="home-banner">
<?php putRevSlider("tsleadin") ?>
</div><!-- #home-banner-->
<div id="home-container">
<div id="home-feature">
<h1>Featured Work</h1>
<?php $posts = query_posts( "tag=featured&posts_per_page=8" ); ?>
<?php if( $posts ) : ?>
<ul class="work-list">
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php
#If there is a post thumbnail , it will display. If not it is the thumb function. These
# can be edited in the functions.php file.
if(has_post_thumbnail()){
the_post_thumbnail();
}
else{
the_excerpt();
}
?></a>
<a href="<?php the_permalink(); ?>"><span class="title"><?php the_title(); /*adding the title*/ ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div><!-- #home-feature-->
<div id="home-about">
<h1>About Steve</h1>
<!-- snip
SOME TEXT GOES HERE…
-->
</div><!--#home-about-->
<div id="home-work">
<h1>Recent Work</h1>
<?php $posts = query_posts( "cat=9&posts_per_page=8" ); ?>
<?php if( $posts ) : ?>
<ul class="work-list">
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php
#If there is a post thumbnail , it will display. If not it is the thumb function. These
# can be edited in the functions.php file.
if(has_post_thumbnail()){
the_post_thumbnail();
}
else{
the_excerpt();
}
?></a>
<a href="<?php the_permalink(); ?>"><span class="title"><?php the_title(); ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div><!-- #home-work-->
<div id="home-loop">
<h1>Recent News</h1>
<?php get_sidebar() ?>
<div id="content">
<?php $posts = query_posts( "cat=1&posts_per_page=10" ); /* calling some news posts */ ?>
<?php if( $posts ) : ?>
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<div id="post-<?php the_ID(); ?>" class="post">
<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="date"><?php the_date(); ?></div>
<div class="meta"><?php _e(""); ?> <?php edit_post_link(); ?></div>
<div class="storycontent">
<?php the_content('Read on...'); ?>
</div><!-- .storycontent -->
<div class="horiz-bar">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/end-post.gif" height="2" width="162" alt="--" />
<?php wp_link_pages(); ?>
</div><!-- .horiz-bar -->
</div><!-- #post-<?php the_ID(); ?> .post -->
<?php endforeach; ?>
<?php endif; ?>
<div id="nav-below">
<div class="center">
<?php posts_nav_link(' || ', __('&laquo; Previous'), __('Next &raquo;')); ?>
</div><!-- #center -->
</div><!--#nav-below"-->
</div><!--#content-->
</div> <!-- #home-loop -->
<?php get_footer(); ?>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment