K
K
khodos_dmitry2020-07-12 11:51:06
WordPress
khodos_dmitry, 2020-07-12 11:51:06

How to add an image to a post using code in WordPress?

Roughly speaking, I want to install this image here:
5f0acec375575757772162.png
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 question

Ask a Question

731 491 924 answers to any question