I have produced a custom page which is set as my home page, in this particular custom page I'm tugging the latest publish from the specific category, I have also produced a kind of pagination that when clicked on upon will require the consumer to single.php. My intention for that single.php would be to have two custom loops.

Custom loop one I would like single.php to differentiate it has originated from the home page and loop through all the posts labeled with similar category because the one around the home page.

A few of these posts must be labeled using more than one category, therefore the loop will need to know to disregard another groups and merely give consideration towards the category under consideration. Does which make sense?

Custom loop two When the user has not showed up in the home page, single.php will just behave as it normally does i.e, when the user originates from index.php (your blog) they'll be come to this second loop (blog publish)

However don't appear to have the ability to result in the distinction between your two loops, I would be over further complicating matters, as I have got a loop which systems everything together after which I've got a loop for my custom pagination.

This is actually the code below to inform you what I am speaking about

custompage.php (set by) - This works all right but I'll publish it simply incase anybody has the capacity to tidy up

<?php query_posts('cat=1'); ?>

<?php
$myPosts = new WP_Query();
$myPosts->query('showposts=1');

if (have_posts()) :
while ($myPosts->have_posts()) : $myPosts->the_post();
?>

<script type="text/javascript">$.backstretch("<?php $key="image"; echo get_post_meta($post->ID, $key, true);?>");</script>
<div id="post-<?php the_ID(); ?>" class="info">
      <h2><?php the_title(); ?></h2>
        <ul class="nav">
           <?php query_posts('posts_per_page=1&offset=1'); the_post(); ?>
           <li class="prev"><a href="<?php the_permalink() ?>">Previous</a></li>
            <?php wp_reset_query(); ?>
            <li class="next"></li>
        </ul>
</div>
<!-- end .info -->

<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>

single.php - Presently damaged

<?php if( in_category('1') ) { ?>
   <!-- start -->
   <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" class="info">
    <script type="text/javascript">$.backstretch("<?php $key="image"; echo get_post_meta($post->ID, $key, true);?>");</script>
            <h2><?php the_title(); ?></h2>
            <ul class="nav">
                <li class="prev"><?php previous_post_link('%link', '&nbsp;', 'true', '1') ?></li>
                <li class="next"><?php next_post_link('%link', '&nbsp;', 'true', '1'); ?></li>
                <!--li class="prev"><?php //previous_post_link('%link', '%title;', 'true', '1') ?></li>
                <li class="next"><?php //next_post_link('%link', '%title;', 'true', '1'); ?></li-->
            </ul>
    </div>
    <!-- end .info -->
    <?php endwhile; else: ?>
    <?php endif; ?>
   <!-- end -->

<?php }else{ ?>

   <div id="content" class="widecolumn" role="main">
   <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
         <h2><?php the_title(); ?></h2>
         <div class="entry">
            <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
         </div>
      </div>
   <?php comments_template(); ?>
   <?php endwhile; else: ?>
      <p>Sorry, no posts matched your criteria.</p>
    <?php endif; ?>
   </div>

<?php } ?>

The issue I appear to become encountering happens when a publish continues to be labeled with two groups, wordpress does not appear to have the ability to result in the distinction between your two groups and rather than transporting onto the following category it breaks and defaults towards the second loop.