Add "attachments" conditions
This would be listed under the "Hierarchy" section and would have conditions for each attachment type (according to the template hierarchy flow) as well as a condition for all attachments, if no specific type has a custom widget area.
hello @mattyza , I have not understood what you mean, thank you
"Attachments" (items in the WordPress Media Library) each have a corresponding page generated by WordPress. These pages use different template files in the theme, optionally for the media type, and with a check for a default "attachment.php" template file, before the fallback to a default template.
This issue proposes adding conditions for this set of templates in the template hierarchy.