Answer the question
In order to leave comments, you need to log in
How to add an image to a post using code in WordPress?
Roughly speaking, I want to install this image here:
Tried through this function: set_post_thumbnail(1425, 1392);
The first id is the post id. The second ID is meta_id _wp_attached_file
But something didn't work out.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question