<?php
/**
 * Our custom dashboard page
 */

/** WordPress Administration Bootstrap */
require_once( ABSPATH . 'wp-load.php' );
require_once( ABSPATH . 'wp-admin/admin.php' );
require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap about-wrap">

	<h1><?php _e( 'Welcome to My Custom Dashboard Page' ); ?></h1>
	
	<div class="about-text">
		<?php _e('Donec id elit non mi porta gravida at eget metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.' ); ?>
	</div>
	
	<h2 class="nav-tab-wrapper">
		<a href="#" class="nav-tab nav-tab-active">
			<?php _e( 'Step 1' ); ?>
		</a><a href="#" class="nav-tab">
			<?php _e( 'Step 2' ); ?>
		</a><a href="#" class="nav-tab">
			<?php _e( 'Step 3' ); ?>
		</a>
	</h2>
	
	<div class="changelog">
	   <h2>Recent Attachments</h2>
<?php 
$args = array(
  'post_type' => 'attachment', 
  's' => 'id229', 
  'order' => 'DESC', 
  'orderby' => 'date', 
  'posts_per_page' => 6, 
  'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1, 
);

// WP_Query
$eq_query = new WP_Query( $args );
$offset = 0;
$eq_total_posts = $eq_query->found_posts - $offset;
if ($eq_query->have_posts()) : // The Loop
$eq_count = $args['paged'] * $args['posts_per_page'] - $args['posts_per_page']; // Count items
?>
<div class="wp-easy-query"  data-total-posts="<?php echo $eq_total_posts; ?>">
<div class="wp-easy-query-posts">
<ul class="">
<?php 
while ($eq_query->have_posts()): $eq_query->the_post();
$eq_count++;
?>
<li <?php if (!has_post_thumbnail()) { ?> class="no-img"<?php } ?>>
   <?php if ( has_post_thumbnail() ) { 
      the_post_thumbnail(array(100,100));
   }?>
   <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
   <p class="entry-meta"><?php the_time("F d, Y"); ?></p>
   <?php the_excerpt(); ?>
</li>
<?php endwhile; wp_reset_query(); ?> 
</ul>
</div>
<?php include_once(EWPQ_PATH.'core/paging.php'); ?>
</div>
<?php endif; ?> 
	</div> <!-- changelog ends -->

</div>
<?php include( ABSPATH . 'wp-admin/admin-footer.php' );