Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter asvarox

    (@asvarox)

    I can’t edit it anymore…

    Anyway, folks @ IRC helped me spot a mistake in my code, when inserting an attachment
    $thumb_id = wp_insert_attachment($attachment, $file, $newPost);
    variable $file wasn’t defined, after filling it with proper data, new posts had the thumbnail attachment displayed correctly. I fixed ones posted before solving the problem by adding “_wp_attached_file” to their meta. Resolved!

Viewing 1 replies (of 1 total)