• I want to create a page where users can download pdf files from my site. I’ve done this before with a straight HTML website, using <a>

    I am using the paragraph block, enter text, highlight the text, and then click the link button. I can type in the path to the file. Save, and run this page. Click on the hyperlink, and the document opens on the screen. So, the hyperlink works.

    Back to the Gutenberg editor, click on the link button, use the 3dot menu, and select open in a new tab. Test. Yes this works.

    So, I am creating the links OK, but I can’t see any way to include the download attribute in my hyperlink. Is this possible?? Is there some plugin that will do what I want to do?

Viewing 1 replies (of 1 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Links are just links. They don’t have a “download” option. The browser decides what to do with the link.

    If you want to force a download, then that’s different, and kind of outside WordPress. You need to use something else to change the server mime type that it returns for that type of file. So, do you want to force downloads for all PDF files, or what?

Viewing 1 replies (of 1 total)
  • The topic ‘Paragraph block link….but no attributes’ is closed to new replies.