Post thumbnail not accessible until post is edited
-
I am using the plugin to allow unregistered users to create content with a featured image. I am using the ‘Always publish immediately’ option in the plugin settings.
When the user submits the form, the same page reloads with a querystring (?success=1&post_id=14)
I can grab the newly created post id and access all of its properties, except the post thumbnail. It is as if there is no post thumbmnail associated with that post<?php echo get_the_post_thumbnail( intval( $_GET['post_id'], 'full' ); ?>
But when I check the admin side, I can see that there is a thumbnail image for the post. Also, as soon as I hit the edit button on the admin side, the above code starts to return the img tag with the right thumbnail image.
I suspect, a missing database linking is completed when I request the post on the admin side.
Or am I missing something?
- The topic ‘Post thumbnail not accessible until post is edited’ is closed to new replies.