I'm looking to get the index-page of the Wordpress-blog show some very specific posts. So far as I realize i have to make use of a standard loop to be able to make sticky posts work, so custom queries is unthinkable. (Correct me if this sounds like wrong.)

All posts are include a primary category (Eg. "Make-Up") Additionally, posts which should show around the top of the page will get one more category "Frontpage".

The present loop results all posts, no matter category. And designs certain groups in a different way. A good example will be the video-category that is only proven through getting an embed code from the custom area within the publish.

 <?php elseif (in_category('20')) : ?>     
 <div class="post element grid_4">
 <?php echo get_post_meta($post->ID, 'Embed', true) ?>
 </div>

I have to remove all posts not within the category "Frontpage" yet still be in a position to control how posts are now being proven.

Earlier i made use of a filter to manage the primary loop:

function exclude_category($query) {
if ( $query->is_home ) {
$query->set('cat', '20 27');
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');

However this could cause my geomashup-wordpress plugin to interrupt because it most likely uses exactly the same loop?

My current proposal for any solution is always to make a move such as this, plus functioning code:

 <?php elseif (the post is in BOTH category 20 and 27)) : ?>     
 <div class="post element grid_4">
 <?php echo get_post_meta($post->ID, 'Embed', true) ?>
 </div>

 <?php else : ?>     
 <div style: display: none;></div>

However am unsure about how exactly create a condition demanding the publish to stay in two groups, and that i understand this can be a terribly dirty fix.

Any tips or pointers regarding the way i could solve this is greatly appreciated :)

Top of the page is visible here: http://parfymelle.brandbase.no

For anybody wondering i solved it by such as the geotagged posts-category (the store locations) within the filter for that primary loop, after which utilizing a php if within the index.php to cover posts from that category. Dirty, but works, i suppose.