View Single Post
Old 07-01-2015, 08:10 PM  
lollipopx
Confirmed User
 
lollipopx's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 171
a little script help needed

how to tell the following script to use specific categories and tags rather than random?
so it will display just the categories and tags i want it too. ie blowjobs, oral...etc..

<h2 class="post-title">Videos selected for you</h2>

<?php $args = array( 'numberposts' => 42, 'orderby' => 'rand' );

$rand_posts = get_posts( $args );

foreach( $rand_posts as $post ) : ?>

<div class="post" id="post-<?php the_ID(); ?>">

<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(240,180), array('alt' => get_the_title(), 'title' => '')); ?></a>

<?php if ( get_post_meta($post->ID, 'duration', true) ) : ?><div class="duration"><?php echo get_post_meta($post->ID, 'duration', true) ?></div><?php endif; ?>

<div class="link"><a href="<?php the_permalink() ?>"><?php short_title('...', '34'); ?></a></div>

<span>Added: <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></span>

<span><?php the_tags('Tags: ', ', ', ''); ?></span>

</div>

<?php endforeach; ?>

<div class="clear"></div>
__________________
Lollipopx.com
Twitter @lollipopx_1, Tumblr lollipop-x, ICQ 669068563, Skype lollipop_130 Tell me your from gfy or i might ignore you.
lollipopx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook