Timeline for Using set_post_thumbnail inside save_post action gets overwritten
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 31, 2012 at 0:54 | history | edited | kaiser | CC BY-SA 3.0 |
added 21 characters in body
|
Aug 30, 2012 at 23:03 | vote | accept | SgtSlaughter | ||
Aug 30, 2012 at 23:03 | answer | added | SgtSlaughter | timeline score: 0 | |
Aug 27, 2012 at 17:11 | comment | added | SgtSlaughter | I will, thanks (although because my low reputation I have to wait 8 hrs... ugh). | |
Aug 27, 2012 at 17:10 | comment | added | Chip Bennett | Please post that as an answer, along with the entire, relevant code. :) | |
Aug 27, 2012 at 17:06 | comment | added | SgtSlaughter | I was trying to set the Core post-thumbnail. I found my issue. I was running the function: delete_post_meta($post_id, '_thumbnail_id'), before I would set_post_thumbnail($post_id,$thumb_id); Apparently even though the delete was in the code before it still caused it to delete it from the DB. Very strange... I had it in there as I was worried I would be creating multiple _thumbnail_id meta entries for the same post. | |
Aug 27, 2012 at 16:59 | comment | added | Chip Bennett | Are you trying to set the Post Thumbnail (i.e. the core post-thumbnail/featured-image functionality), or are you trying to set a custom post meta field? | |
Aug 27, 2012 at 16:42 | history | asked | SgtSlaughter | CC BY-SA 3.0 |