Back to GD bbPress Attachments Forum

Add a class to download, delete, and detach links

Published on: February 24, 2017 at 6:27 pm · By: memoryexpress

Hi Milan,
I hope you’re well.

I was hoping you could add a CSS class to the download, delete, and detach links for the file attachments.

I noticed that the download link looks like this:

<a class download href="">

Is it supposed to be this?:

<a class="download" href="">

Including a unique class for the three clickable links would let your plugin users style those links more directly.
For my purposes, I need a class on the link itself to deal with a compatibility issue between GD bbPress Attachments and Slim Stat Analytics. Currently, when one of my users clicks the download link, two copies of the file are pulled down. I need a class on the


itself so I can filter out that click in the analytics program.

Let me know what you think.

Thanks for all your hard work!


Topic Information
Feature Request
Viewing 5 replies - 1 through 5 (of 5 total)
  • #55153

    In this case, ‘download’ is an attribute for the A tag that tells the browser to download the file, and not open it, and ‘class’ attribute is empty. Right now, the plugin has no option to set custom CSS class on the link. And, there is no need to have class on that A tag, all of them can be accessed in JavaScript via selector ‘.bbp-attachments a’.


    Dev4Press - Premium plugins for WordPress.

  • #55154

    Hi Milan,

    Thanks for the quick reply, and the clarification on the ‘download’ attribute.

    It’s true that I your users can already select those elements using ‘.bbp-attachments a’.

    Unfortunately I can’t use that method of selection to add a filter in the Slim Stat Analytics’ plugin.
    Would you be able to add a class anyway?
    It would save me from having to hack the bbPress Attachments plugin any time I update it.

    I recognize it’s a change that will only benefit your users that also use analytics software, but it’s an extremely low-cost change to make on your end.

    Thanks for your help!

  • #55156

    I will add this to the list for the next version (I can’t say exactly when it will be out, but it should be soon once I finish tests with upcoming bbPress 2.6).


    Dev4Press - Premium plugins for WordPress.

  • #55158

    That’s incredible. Thank you very much, Milan.

    I know you have a lot on your to-do list already. Little things like this go to show how amazingly you support your products.

  • #55557

    Hi Milan,

    I just wanted to come back and say thanks a lot for adding those classes to the download links. My issue is totally resolved.

    I really appreciate the support.

    Mike Bolton
    Memory Express

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add a class to download, delete, and detach links’ is closed to new replies.