8 reputation
3
bio website mattcleghorndesign.co.uk
location
age
visits member for 3 years
seen Sep 11 '13 at 11:55

Aug
30
awarded  Student
Apr
11
comment Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
I have a feeling that this is the way to go but can't get it to work - when I implement it I'm getting php errors...I'm trying a variation of your suggestion using query posts as a start <?php global $post; $args=array( 'numberposts'=>3, //show 3 posts 'post_type'=>'portfolio', //posts only 'meta_key'=>'_thumbnail_id', //with thumbnail 'exclude'=>$post->ID, //exclude current post 'orderby'=>'rand' //randomize ); $custom_posts = get_posts($args); foreach($custom_posts as $post) : setup_postdata($post); $i = 1; $i++; if ($i == 1) ?>
Apr
11
comment Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
Hi David - am I right in thinking that this will just print out 3 posts in ascending order with their relevant post thumbs? I'm aiming to display three different thumbnails - i think your solution will still result in 3 sets of 3 thumbnails. Could you add any additional info?
Apr
11
comment Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
Thanks Ben, will try this too. Cheers.
Apr
11
comment Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
Thanks David, will try this out and let you know how I get on.
Apr
10
asked Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
Nov
9
awarded  Tumbleweed
Oct
4
awarded  Scholar
Oct
4
accepted Toolbox theme using printif statement - help needed understanding code block
Sep
28
asked Toolbox theme using printif statement - help needed understanding code block