Answer the question
In order to leave comments, you need to log in
Why does it display a template page instead of links when viewing media files (pictures)?
Hello!
For some reason, when viewing a media file on my site, instead of a link to the file, it leads to a template page along the path
wp-includes\post-template.php
and is formed in this way
$p = '<p class="attachment">';
// Show the medium sized image representation of the attachment if available, and link to the raw file.
$p .= wp_get_attachment_link( 0, 'medium', false );
$p .= '</p>';
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