List of posts not updating in metabox

Home Forums WPAlchemy List of posts not updating in metabox

This topic contains 0 replies, has 1 voice, and was last updated by  dagfooyo 1 year, 6 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2512

    dagfooyo
    Participant

    I’ve got a metabox that allows authors to add a link to an associated post.  It’s been working fine for months but now for some reason the dropdown with the appropriate posts isn’t updating.  Here’s the code in the custom post meta php file:

    <p>

    <?php $mb->the_field(‘product_video_ID’); ?>

    <select name=”<?php $mb->the_name(); ?>”>

    <option value=””>None</option>

    <?php

    global $thispost;

    $myposts = get_posts(‘numberposts=5000&offset=1′);

    foreach($myposts as $thispost) :

    if (in_category(“Product Videos”, $thispost)) {

    ?>

    <option value=”<?php echo $thispost->ID; ?>” <?php $mb->the_select_state($thispost->ID);?> ><?php echo get_the_title($thispost->ID); ?></option>

    <?php } ?>

    <?php endforeach; ?>

    <?php setup_postdata($thispost);?>

    </select>

    </p>

    I tried adding a couple test posts in the Product Videos category and they didn’t show, either.  I  commented the lines that filtered for that category and the Meta box dropdown updated to show every post… except the one I wanted and the new test ones.  Anybody have any idea what might be going on?  Is there some part of the machinery here that isn’t updating that I should fix?  Thanks so much!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.