background images WP Supersized on homepage

query_posts

Avoid this function at all costs. The likely cause of your problem is queries not cleaning up after eachother. Your call to query_posts will have modified the main query ( wasting the original ), and messed up everything following it.

Instead use WP_Query followed by wp_reset_postdata

$query = new WP_Query('cat=17&posts_per_page=1&meta_key=FeaturedOnHomepage&meta_value=yes');
if($query->have_posts()){
    while ($query->have_posts()) {
        $query->the_post();
        ?><a href="https://wordpress.stackexchange.com/questions/62645/<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><?php
    }
    wp_reset_postdata();
} else {
    // you didn't put anything here either
}

You should format your code appropriately, too many , and don’t use the if(): endif; stuff, it’s cluttering up your code and preventing code editors from matching braces