Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6340
    ike
    Participant

    Hey, me again I’m afraid!

    I’m looking at the possibility of displaying attachment information with no link, for multiple reasons:

    – Non registered users can see what is available for download but can’t click
    – Useful for excerpts to encourage users to enter the full post to gain access to a download
    – Generally just displaying information on it’s own (download count, file size etc)

    Seeing as I’m protecting the URL with a filter, I can just hide elements of what is displayed using the [download-attachments] shortcode in excerpt, but it would be very useful and possibly beneficial to others!

    Thanks again

    #6341
    Bartosz
    Keymaster

    Hi again,

    No problem, I like your questions :)

    According to this one: you can achieve that already. There’s a da_display_attachments filter hook, that holds the attachments output (no matter if this is in a function or via shortcode). You’d need to use some preg_replace on the da_display_attachments filter to convert each of the links (which can be found by the class name “attachment-link”) to span’s or anything you need.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.