This post contains 7 different solutions which enable you to:
- Open a PDF file in the same window
- Check if the custom field value field is empty
- Link to the full file URL
- Link to title text
- Link to a icon
- Open a file in a new window
- Add button & open PDF using printf
All solutions assume you have added a URL for your file to the custom field value field or any plugin field which generates meta boxes like ACF.
Here’s the code for all 7 solutions, all coded differently:
Leave a Reply
You must be logged in to post a comment.