Multiple magic fields on same page causing double posts
-
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>-
<?php query_posts( ‘category_name=portfolio’ ); ?>
- <?php echo get_image(‘port_thumb’);?>
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
” rel=”bookmark”
title=”Permanent Link to <?php //the_title_attribute(); ?>”><?php endwhile; ?>
<?php //next_posts_link(‘Older Entries’) ?>
<?php //previous_posts_link(‘Newer Entries’) ?><?php else : ?>
<?php endif; ?>
<!–end typography–>
</div><!—— BEGIN ILLUSTRATION–>
<div class=”illustration”>
<div class=”title2″>
</div>-
<?php query_posts( ‘category_name=portfolio’ ); ?>
- <?php echo get_image(‘illustration_thumb’);?>
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
” rel=”bookmark”
title=”Permanent Link to <?php the_title_attribute(); ?>”><?php endwhile; ?>
<?php //next_posts_link(‘Older Entries’) ?>
<?php //previous_posts_link(‘Newer Entries’) ?><?php else : ?>
<?php endif; ?>
<!–end ILLUSTRATION–>
</div><!— PHOTOGRAPHY—>
<div class=”photography”>
<div class=”title3″>
</div>-
<?php query_posts( ‘category_name=portfolio’ ); ?>
- <?php echo get_image(‘photo_thumb’);?>
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
” rel=”bookmark”
title=”Permanent Link to <?php the_title_attribute(); ?>”><?php endwhile; ?>
<?php //next_posts_link(‘Older Entries’) ?>
<?php //previous_posts_link(‘Newer Entries’) ?><?php else : ?>
<?php endif; ?>
<!–end image–>
</div><!–end main–>
</div><!–content end–>’
The topic ‘Multiple magic fields on same page causing double posts’ is closed to new replies.