2nd featured Image in portfolio loop
-
Hi,
i looked all around the items and searched for a solution of my wish but I’m not able to realize it. I think this plugin is really the right one for my theme. I have a special portfolio loop. There I only want the second featured image been shown as the preview picture instead of the first article image that is been cropped. I tried to implement some codes I found in the php-file on different places but nothing worked. I don’t know what to try anymore. Here is the link to the portfolio site and the original code. As I descriped, I’d like to have the second featured image instead of the original first image. Perhaps anyone has an idea where to put which code?
All the best
Dorette<?php
/*
Template Name: Portfolio
*/
?><?php get_header(); ?>
<div id=”content”>
<?php
global $post;
$x = 0;
$myposts = get_posts(‘numberposts=20&category_name=Portfolio’);
foreach($myposts as $post) :
setup_postdata($post);
?><div class=”portfolio_post <?php if($x == 0) { echo “left”; } else { echo “right”; } ?>”>
“><img src=”<?php echo catch_that_image() ?>” width=”327″ height=”284″ />
</div><!–//portfolio_post–>
<?php $x++; ?>
<?php if($x == 2) { $x=0; } ?><?php endforeach; ?>
</div><!–//content–>
</div><!–//left_container–>
<div class=”right_container”>
<div class=”right_sidebar”>
<?php
global $post;
$myposts = get_posts(‘numberposts=20&category_name=Featured Small’);
foreach($myposts as $post) :
setup_postdata($post);
?>“><img src=”<?php echo catch_that_image() ?>” width=”172″ height=”104″ />
<?php endforeach; ?>
</div><!–//right_sidebar–>
</div><!–//right_container–>
<?php get_footer(); ?>
- The topic ‘2nd featured Image in portfolio loop’ is closed to new replies.