Skip to content
Public Ticket #7725

Attachment page template

Conversation thread

Penci Design replied

Staff Reply

Hi,

I  checked  your image attachement . It seems that short link  have mess ( sin adjuntar ) http://prntscr.com/ndauc4

Best Regards,

PenciDesign

comfix1 replied

Customer Reply

Many thanks, that'll do the trick.

What I still don't understand is why the shorter url makes use of the pdf.php template but the other one appears in a totally different manner when attachment.php had the same code.

Penci Design replied

Staff Reply

Hi,

Please send me your website managment information ( admin url site, username and password ) in order for me to have access to know the exact issue. We will take it a lock on this help you.

Best Regards,

PenciDesign

comfix1 replied

Customer Reply

Sorry I didn't myself clear.

The problem is that I've created a template for the attachments pages but the theme is not using it for the url that WP assigns to them when the files are associated with a post or page.

I.e. I upload a file through the media library, and its own attachment page has the structure domain/media, this page uses the attachment.php template.

After that, when I add the same file on the content of a post or page, and I set that it is linked to the attachment page, the url of the link is like domain/post/media and this page uses a different template.

I need this pages to use the attachment.php template or make that this link directs to the main url (domain/media instead of domain/post/media). Because manually changing the url each time is not an option.

Thanks for your help.

Penci Design replied

Staff Reply

Hi,

Sorry, I'm not clear about the question.

Do you want create new template page ?

Please checkt this guide to know how to create a custom template page 

Best Regards,

PenciDesign

comfix1 started the conversation

Conversation Start

Hello there,

I've created a template for attachment pages but while the theme uses it as expected for its "main" url (mainsite/attachmentpage) it does not with the url related to the page/post where the media is inserted (mainsite/page/attachmentpage).

I've created pdf.php (since I'm using it with this files), attachment.php and single-attachment.php files but to no avail.

Many thanks.

Want to join this conversation or access attachments? Sign in first.