Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #1916881
Attachment Page
Closed

Comments

  •  1
    Muhammad started the conversation

    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

  •  501
    Penci replied

    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

  •  1
    Muhammad replied

    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

  •  501
    Penci replied

    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

  •   Muhammad replied privately
  •  501
    Penci replied

    Hi,

    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


  •  501
    Penci replied

    Hi,

    Please check screenshot http://prntscr.com/mt4ruw

    Best Regards,

    PenciDesign

  •  1
    Muhammad replied

    Done. closed this ticket now.


    Thanks