Return to Snippet

Revision: 37165
at December 5, 2010 07:00 by vedgiee


Initial Code
<?php if (is_home()) {
 // we're on the home page, so lets show the welcome message, and a single page beneath..
?>
 
			<div id="content-1">
				<div id="content-1-left">
					<img src="#" alt="" />
				</div><!--End Content-1-Left -->
				<div id="content-1-right">
					<h1>Welcome!</h1>
					<p>Ut vitae velit sed elit tincidunt fermentum. Phasellus a nunc sit amet quam dapibus varius eget eget ligula. Quisque sit amet ligula a enim convallis aliquet non quis enim. Vestibulum aliquam mollis lobortis. Praesent pharetra pellentesque mauris. Phasellus id magna vitae est accumsan aliquam non ut eros. Nullam dignissim massa vel arcu molestie tempor id vitae elit. Sed aliquet dolor ac leo tincidunt aliquet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus ut felis pretium tellus vestibulum lobortis ac eu nibh. Pellentesque orci neque, sodales in aliquam eu, tincidunt et diam. Aliquam eget sapien tortor, malesuada tempor felis. Morbi laoreet justo sit amet turpis congue nec posuere enim varius. Nunc fringilla blandit neque sit amet sagittis.</p>
					<br/>
				</div><!--End Content 1 Right -->
			</div><!--End Content 1 -->
			<br class="clear"/>			
            <div id="content-splitter">
            	<p>&nbsp;</p>
            </div>
			<div id="content-2">
				<div id="content-2-left">
				<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
					
					<?php $featured_page = new WP_Query("page_id=2"); //Show the Featured Content By ID. ?>
					
					<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>

						<?php the_content(); ?>
						
						<?php endwhile; else: ?>

						<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>

						<?php endif; ?>

						<br/>
				</div><!--End Content-2-Left -->
				<div id="content-2-right">
					<img src="#" alt="" />
				</div><!--End Content-2-Right -->
			</div><!--End Content 2-->
            <br class="clear"/>	

 <?php }?>

Initial URL


Initial Description
Custom Loop for Wordpress Main page, show static content and 1 selected page.

Initial Title
Wordpress Custom Loop

Initial Tags


Initial Language
PHP