WP User Frontend
Remove Image Link (2 posts)

  1. 09andy04
    Posted 4 years ago #

    This plugin is great and is working fine on my website, though I would like to make a minor tweak.

    When a user uploads an image with a post, it shows on the post page with a hyperlink to the image file URL (opens a larger version of the image). I would like to remove this link.

    I did experiment myself and found the following line under wp-user-frontend/wpuf-functions.php:

    $attach .= sprintf( '

  2. <img src="%s" alt="%s" />
  3. ', $file['url'], $thumb[0], esc_attr( $file['title'] ) );

    If you remove the a href tag, then the link will be removed but it no longer gets resized to a thumbnail on the post page, which is not convenient if users upload large image files.

    How can I remove this image link without having an effect on thumbnail resizing?


  • gouffy41
    Posted 4 years ago #


    Try to delete the line 632 in functions.php:

    $attach .= sprintf( '

  • %s
  • ', $file['url'], esc_attr( $file['title'] ), $file['title'] );

    Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic