• It seems like “query_posts” doesn’t work.
    i set new category name and number of posts to display, but it shows the same category and number of posts in the wp admin options
    :S

    <?php $temp_query = $wp_query; ?>
            <?php query_posts('category_name=' . get_option('gallery-category') . '&showposts=' . get_option('gallery-items')); ?>
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <div class="imageElement">
                <h2><?php the_title() ?></h2>
                <p><?php the_content_rss('', TRUE, '', 30); ?></p>
                <a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
                <img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
                <img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
            </div>
            <?php endwhile; else: ?>
            <?php endif; ?>
            <?php $wp_query = $temp_query; ?>
  • The topic ‘query_posts not working’ is closed to new replies.