BuddyDev

Search

How can I add an external hyperlink to the thumbnail and image/video?

  • Participant
    Level: Enlightened
    Posts: 24
    Jack on #23162

    In MediaPress when I look at a WordPress page with a gallery on it, the image thumbnails appear.

    I need to be able to see a clickable link on each image that leads to an external web page.

    I tried putting an URL into the title and description, didn’t work.

    I tried putting html into title and description ->

    click here for download and location.

    Doesn’t work.

    I am just directed to another WordPress page.

    Is there a way to include a hyperlink to an external URL?

    Thanks

  • Participant
    Level: Enlightened
    Posts: 24
    Jack on #23165

    I’m able to put a clickable link on the bottom of an image, but I can’t figure out how to put a clickable link at the bottom of the thumbnails on the opening page of a gallery.

    Is that possible?

    thanks

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #23166

    Hello Jack,

    Thank you for posting. Please share your custom code you are using to add the link under image. So that I can help.

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 24
    Jack on #23184

    In WordPress I pick MediaPress ->

    I Pick “All Galleries”, I pick a Gallery. ->

    In “Edit Gallery” I pick “Edit Media” ->

    In the “Title” tab I have entered ->

    < a href=”https://imgur.com/C2oXyra”>link text

    link text

    and

    and

    https://imgur.com/C2oXyra

    and

    <https://imgur.com/C2oXyra&gt;

    and

    <p>https://imgur.com/C2oXyra</p>
    ‘<p>https://imgur.com/C2oXyra</p>’

    None work to place a link under the thumbnails of the opening page of the gallery.

    Thanks

    • This reply was modified 5 years, 6 months ago by Jack.
    • This reply was modified 5 years, 6 months ago by Jack.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #23196

    Hello Jack,

    Thank you for sharing the details. Sorry, But still not getting it. You can try this following code in your bp-custom.php (more info: https://codex.buddypress.org/themes/bp-custom-php/).

    https://gist.github.com/raviousprime/c14532a281f478e2bef1148fc6865946

    Also you need to override related gallery template in the active theme. To add some actions before and afer thumbnail.

    The above code provide functionality to add a new custom link text field in gallery edit media screen. You can put custom link to media over there. It will navigate to the media thumbnail.

    Please give a shot and let me know. If works for you or not.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved