Comments 1Muhammad started the conversationMarch 2, 2019 at 3:31pmHi Dear,i want to edit also attachment.php file so where i can edit this file link herehttps://www.trywallpapers.com/desktop-vikings-hd-wallpapers/desktop-vikings-hd-wallpapers/i want to add there some my own code.Thanks 501Penci repliedMarch 3, 2019 at 7:45amHi,Please open PenNews theme folder, then copy single.php file then rename to "single-attachment.php" filethen add custom code to file as screenshot http://prntscr.com/msieetBest Regards,PenciDesign 1Muhammad repliedMarch 3, 2019 at 1:50pmHi,i create this file http://myprintscreen.com/s/11jo1/58d6b0932a and there showing image but i want to show full size image on single-attachment.php file what i can do ?link:https://www.trywallpapers.com/fire-art-wallpaper-hd/fire-art-wallpaper-hd-2/screen link:http://myprintscreen.com/s/11job/3cca6f209ahttp://myprintscreen.com/s/11joc/11a527ed5eThanks 501Penci repliedMarch 4, 2019 at 2:28amHi, 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 Muhammad replied privately 501Penci repliedMarch 4, 2019 at 4:58pmHi,I checked and add custom code to function.php file to do that: function modify_attachment_link( $markup, $id, $size, $permalink, $icon, $text ){ $_post = get_post( $id ); $size = 'full'; if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) ) { return __( 'Missing Attachment' ); } if ( $permalink ) { $url = get_attachment_link( $_post->ID ); } if ( $text ) { $link_text = $text; } elseif ( $size && 'none' != $size ) { $link_text = wp_get_attachment_image( $_post->ID, $size, $icon, $attr ); } else { $link_text = ''; } if ( '' === trim( $link_text ) ) { $link_text = $_post->post_title; } if ( '' === trim( $link_text ) ) { $link_text = esc_html( pathinfo( get_attached_file( $_post->ID ), PATHINFO_FILENAME ) ); } return "<a href='" . esc_url( $url ) . "'>$link_text</a>";} add_filter( 'wp_get_attachment_link', 'modify_attachment_link', 10, 6 ); Please check it again.Best Regards,PenciDesign 501Penci repliedMarch 4, 2019 at 4:59pmHi,Please check screenshot http://prntscr.com/mt4ruwBest Regards,PenciDesign 1Muhammad repliedMarch 5, 2019 at 10:48amDone. closed this ticket now.Thanks Sign in to reply ...
Hi Dear,
i want to edit also attachment.php file so where i can edit this file link here
https://www.trywallpapers.com/desktop-vikings-hd-wallpapers/desktop-vikings-hd-wallpapers/
i want to add there some my own code.
Thanks
Hi,
Please open PenNews theme folder, then copy single.php file then rename to "single-attachment.php" file
then add custom code to file as screenshot http://prntscr.com/msieet
Best Regards,
PenciDesign
Hi,
i create this file http://myprintscreen.com/s/11jo1/58d6b0932a and there showing image but i want to show full size image on single-attachment.php file what i can do ?
link:
https://www.trywallpapers.com/fire-art-wallpaper-hd/fire-art-wallpaper-hd-2/
screen link:
http://myprintscreen.com/s/11job/3cca6f209a
http://myprintscreen.com/s/11joc/11a527ed5e
Thanks
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
Hi,
I checked and add custom code to function.php file to do that:
Please check it again.
Best Regards,
PenciDesign
Hi,
Please check screenshot http://prntscr.com/mt4ruw
Best Regards,
PenciDesign
Done. closed this ticket now.
Thanks