get_latest_posts

The ColorWay Theme getLatestPosts function.

Description

getLatestPosts(); 

Usage

  1. if ( !function_exists( 'getLatestPosts' ) ) { 
  2. require_once '/functions/tabs.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = getLatestPosts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions/tabs.php  
  1. function getLatestPosts() 
  2. if (have_posts ()) : 
  3. $latest_posts = new WP_Query('showposts=6'); 
  4. while ($latest_posts->have_posts()) : $latest_posts->the_post(); 
  5. ?> 
  6. <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> 
  7. <?php 
  8. endwhile; 
  9. endif;