dear
pgrandstaff *cough* *cough*
please do not spread your germs here
Hopefully the developers will chime in here.
Yep I got a solution for you
schleicher12000That was interesting..I had some questions about when you put gallery call in header and use category option, all posts on home page become featured posts..and also any post you click goes to posts specified in gallery...I never knew why it does it...
After reading this powerful article
http://codex.wordpress.org/The_Loop , I found what's wrong...
using
query_posts('category_name=' . get_option('gallery-category') . '&showposts=' . get_option('gallery-items'));
function make wordpress behave by the featured content gallery rules, using this query for the rest of wordpress..
so solution will be create new query object that is not gonna interfere with worpress object
here I post the code for gallery.php that you need to replace..
- Code: Select all
<div id="featured">
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true
});
}
window.addEvent('domready',startGallery);
</script>
<style type="text/css">
.jdGallery .slideInfoZone
{
height: <?php echo get_option('gallery-info'); ?>px;
}
</style>
<div id="myGallery">
<?php
$imgthumb = get_option('gallery-use-thumb-image') ? "thumbnailimg" : "articleimg";
$wordquantity = get_option('gallery-rss-word-quantity') ? get_option('gallery-rss-word-quantity') : 100;
if (get_option('gallery-way') == 'new') {//new way
$arr = split(",",get_option('gallery-items-pages'));
if (get_option('gallery-randomize-pages'))
{
shuffle($arr);
}
foreach ($arr as $post_or_page_id)
{
get_a_post($post_or_page_id); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use-featured-content')) {?>
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php
} ?>
</div>
<?php
}
else { ?>
<?php $my_query = new WP_Query('category_name=' . get_option('gallery-category') . '&showposts=' . get_option('gallery-items')); ?>
<?php while ($my_query->have_posts())
{
$my_query->the_post(); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use-featured-content')) {?>
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php } ?>
</div>
<?php
}?>
</div>