0
votes

I am using Magic Fields to create categorized image galleries. I have created 3 different custom fields (port_thumb, illustration_thumb, photo_thumb) so that I can post my thumbnail image to one of 3 different sections. Is there something I can do to keep each post separate to its designated field? Essentially what happens when I create a post for say 'port_thumb,' the thumbnail image loads up and everything is fine in that section. But then lower on the page in both of the other 2 sections an invisible link for the port_thumb shows up as well as loading in the css for that section. Is there some code I can add to prevent each post from showing up 3 times on the page?

<?php get_header();  
/*Template Name: Portfolio*/ 
?> 


<div id="main">

<!--TYPOGRAPHY-->
<div class="typography"> 
 <div class="title1">
 </div>
<ul>
<?php query_posts( 'category_name=portfolio' ); ?>
<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php //the_title_attribute(); ?>">
<li><?php echo get_image('port_thumb');?></li>
</a>
<?php endwhile; ?>
<?php //next_posts_link('Older Entries') ?>
<?php //previous_posts_link('Newer Entries') ?>

<?php else : ?>



<?php endif; ?>
 </ul> 
 <!--end typography-->
 </div>  

 <!------ BEGIN ILLUSTRATION-->
  <div class="illustration"> 
  <div class="title2">
 </div>
  <ul>
  <?php query_posts( 'category_name=portfolio' ); ?>
 <?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title_attribute(); ?>">
<li><?php echo get_image('illustration_thumb');?></li>
</a>
<?php endwhile; ?>
<?php //next_posts_link('Older Entries') ?>
<?php //previous_posts_link('Newer Entries') ?>

<?php else : ?>



<?php endif; ?>
</ul>
<!--end ILLUSTRATION-->
</div>  


<!--- PHOTOGRAPHY--->
<div class="photography"> 
<div class="title3">
</div>
<ul>
<?php query_posts( 'category_name=portfolio' ); ?>
<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" 
title="Permanent Link to <?php the_title_attribute(); ?>">
<li><?php echo get_image('photo_thumb');?></li>
</a>
<?php endwhile; ?>
<?php //next_posts_link('Older Entries') ?>
<?php //previous_posts_link('Newer Entries') ?>

<?php else : ?>



<?php endif; ?>
</ul>
<!--end image-->
</div>     




<!--end main-->
</div>


<!--content end-->
1

1 Answers

0
votes

I am not sure what you are asking, and I am not even good at this (PHP).

But if I look at you question, you are trying to post a thumnail image into three different divs/wrappers/files, and then your problem is that the thumnail image you post into that three different "things" are not as how you expect. I think the solution is to have a look to each class or id of them then solve their CSS style.