Snippet: A quick and easy second or side loop for WordPress

Resources, related or just simply helpful:

http://codex.wordpress.org/Template_Tags/query_posts
http://codex.wordpress.org/Template_Tags/get_posts

	1, // Number of related posts that will be shown.
				'category_name'=>'monthlytips',
				'orderby'=>'date',
				'order'=>'DESC'
			);
			
			$newsArticles = new wp_query($args);
			if( $newsArticles->have_posts() ) {
				while ($newsArticles->have_posts()) {
					$newsArticles->the_post(); ?>
					<a href="" title="">
                    
					
         
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s