Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1125716
    michaelxxx
    Participant

    Hi,

    I want give every image on an attachment page an custom (external) link.

    So the way should be:
    Image in a post -> Click -> Open Image Attachment Page -> Click -> Open external link

    How can I do this?

    #1125875
    Rahul
    Moderator

    Hey There,

    Thanks for writing in!

    Follow this link for more accurate information :

    https://en.support.wordpress.com/links/image-links/

    Let us know how it goes!

    Thanks.

    #1126132
    michaelxxx
    Participant

    no, this is not what I´m searching for.

    I don´t need an external link in my images in the posts – I know how to do that 😉
    As I wrote I need external links when you click on the image on the attachment page.

    please see the example I have added.

    #1126668
    Nico
    Moderator

    Hi There,

    Thanks for the details it is clear now that it would need a customization and it is quite techinical. It would be best to contact a developer regarding this concern.

    Thank you for your understanding.

    #1127375
    michaelxxx
    Participant

    Ok. Where can I find a list of the developers?

    And how can I add a link back to the original post under an image on the attachment page?

    I tried to add the following to the functions.php

    
    function __checking_attachement() {
     if ( is_attachment() ) {
      echo 'This image is from the post: <a href="' . get_permalink($post->ID) . '">'. get_the_title() .'</a>' ;
     }
    }
    add_action('x_before_the_content_end','__checking_attachement');
    

    But the link is now the url from the attachment page, not from the original post.
    And the title is also from the title of the image, not the title from the original post.

    Can you please modify that code?

    #1127473
    Rupok
    Member

    Hi there,

    If you are looking for a partner to help with your customization needs, you may wish to check out : https://community.theme.co/custom-development/

    Unfortunately we can’t assist on such customization as it’s out of our support scope.

  • <script> jQuery(function($){ $("#no-reply-1125716 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>