Support

Account

Home Forums Backend Issues (wp-admin) Dynamically populating Select Field with CPT Posts Reply To: Dynamically populating Select Field with CPT Posts

  • Hey, was looking at the forum and saw this…I think in the following code:

    if ($the_query->have_posts()) {
          global $post;
          while( $the_query->have_posts() ){

    You do not need:

    global $post;

    You are querying from here and going through the loop based on the results, you have the actual post data, no need to bring the global.