antekera
2/1/2016 - 5:42 PM

Post Type Media Querie

Post Type Media Querie

<?php
    $loop = new WP_Query( array(
        'showposts' => 5,
        'post_type' => array('multimedia'),
        // 'category_name' => Featured,
        )
        );
    while ( $loop->have_posts() ) : $loop->the_post(); ?>
   

   <?php the_title(); ?>

  <?php endwhile; ?>
  
  
  <?php
	    $loop = new WP_Query( array(
        'showposts' => 100,
        'post_type' => array('testimonios'), 
        'orderby' => 'rand',
        'tax_query' => array(
            array(
              'taxonomy' => 'custom_cat_testimonios',
              'field'    => 'slug', // term_id, slug  
              'terms'    => 'ecommerce',
            ),
          )
        )
      );
    while ( $loop->have_posts() ) : $loop->the_post(); ?> 
     <h1 class="outline"><?php the_title(); ?></h1>
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>
  
  
  
  
  
  <?php
$args = array(
    'post_type' => array('videos','image','audio'),
    'category_name' => 'featured',
    'showposts'=> 13,
    'paged' => $paged,
);

$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query($args);
?>

<?php if ( $wp_query->have_posts() ) : ?>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>