1

Well, we want to add the description field on the attached media under the post edit page. I have attached an image for reference.

Explanation: Under posts, after adding an attachment if we click on the edit button to edit the details of the attached media we didn't find any description fields as we want to show the "Description" and also want to add the same facility to update that "Description" the same way we update captions and alt text and other details.

The procedure should be similar and should follow the same behavior as captions and alt text.

We don't want to achieve the solution by playing around with the WP-core. So is there any Hook or way [NO WP-CORE] that can help us to achieve the solution for this problem

Make sure that I am asking to add a description on a Pop-up page at the time of editing any media attached to the post.

Thank you in advance.

enter image description here

enter image description here

6
  • Check this question, it has several answers how to add custom meta fields to media attachment window - wordpress.stackexchange.com/questions/298155/…
    – anton
    Commented Jun 3, 2021 at 14:49
  • i already tried this but it's not working Commented Jun 3, 2021 at 15:34
  • Just tried the code from an answer, it works well on a latest version of WP. Also, I see wp default description field, which I don't see on your screenshot. Maybe you have some plugin installed, which can prevent addition of custom meta field or hides default description field?
    – anton
    Commented Jun 3, 2021 at 16:25
  • Please edit your question with more details about the things you've tried, what didn't work, and what the expected outcome is. Additionally, we'll need to know where you're putting the code.
    – Howdy_McGee
    Commented Jun 4, 2021 at 0:54
  • @anton that solution only works media page at the time of adding media on any post. Commented Jun 4, 2021 at 7:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.