Skip Navigation

[Resolved] Attachments to custom post type

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by jean-noelM 7 years, 2 months ago.

Assisted by: Noman.

Author
Posts
#483494
mu3.jpg
mu2.jpg
mu1.jpg

I am trying to: display attachments of custom post type : native wordpress attachments

I created a custom post type (called "PDFa")
I import entries with WP All Import using "Download and import attachments" to link PDF files to entries

Those attachments are not visible when I edit the entries, where are they ?
How can I display link to those attachments on front-end ?

Please see attached screenshots

Thanks in advance for your help

#483638

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Jean,

Thank you for contacting Toolset Support.

By default native WordPress Attachments do not display in the back-end.

METHOD 1: You can write custom shortcode to fetch attachments something like shown here and then you can adjust the code as per your needs:
https://toolset.com/forums/topic/display-file-name-of-uploaded-file/#post-349949

METHOD 2: Easier way to display your attachment files and for more control on displaying it easily without coding, I would suggest to add PDF files as custom field using Toolset Types >> Post Field so that it will be displayed on the backend and for front-end we can display it using View.

Follow the below steps to Add Custom field for Uploading PDF.

1. First create Custom Post Field:

- Go to: Toolset >> Post Fields >> Edit PDFa (your Post Field Group) >> Add New Field >> select File >> Fill required fields and SAVE.

2. Create or Edit a View for your PDFa and insert your New field in this View:
- Go To: Views >> Create / Edit PDFa View >> Templates for this View section >> Add field you have just created.

Here is doc for creating a View:
https://toolset.com/documentation/user-guides/getting-started-views/part-2-view/
https://toolset.com/documentation/user-guides/views/

3. Now go to your PDFa Post type >> Edit any Post >> You can there see the Upload file Field you have created.

Please let me know if this resolves the issue or you have further question in this regards.
Thank you

#483792

Hello,

Thank you for your answer

Then I will change the format of the Excel that I import and separate the files name with 1 per column in order to use some "File" field type provided by Toolset instead if the global attachments

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.