Is there a function conflict
-
Admin
How did you get all the posts in one category? Using
WP_Query()?I am developing a widget that will allow you to use a drop down to select from a list of posts from one category inside the admin area.
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Person of Month'); ?>:</label>
<select name="<?php echo $this->get_field_name(''); ?>" id="<?php echo $this->get_field_id(''); ?>" class="widefat">
<?php
$first_query = new WP_Query('cat=10&posts_per_page=-1');
// The Loop
while ( $first_query->have_posts() ) : $first_query->the_post(); ?>
<option value=""><?php $first_query->the_post(). the_title() ?></option>
<?php endwhile;
wp_reset_query();
?>
</select>Admin
Hurm.. nothing I can think of in the theme that would cause the issue you’re describing. Try switching to the default theme and see if the issue still persists?
Admin
OK, then it’s probably a conflict with one of your plugins. Try disabling them?
Admin
If you try this instead does it make a difference?
$first_query = new WP_Query( array( 'cat' => 10, 'posts_per_page' => -1 ) );
Viewing 9 posts - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.
