Skip Navigation

[Resolved] List custom field files

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

This thread is resolved. Here is a description of the problem and solution.

Problem:
There are two custom post types: a) Stories, b) Resources. Both have file upload fields called "resources" for people to upload documents to. I have a shared taxonomy called "resource type".

1) I want to have a template for each CPT that will show the page content, then list all the attached files that were uploaded so people can see and download.
2) I want to have a listing page that shows both CPTs in date order.
3) I want a sidebar with the "Resource Type" so people can filter the listing page.

Solution:
Q1) How do you setup the custom file field "resources", is it a multiple instance field? if it is, you can use [wpv-for-each] shortcode to display it as what you want, see our document:
https://toolset.com/documentation/views-shortcodes/#wpv-for-each

Q2) You can try this:
1) Create a view, query posts of both custom post type Stories & Resources
2) Oder the result by the post date

Q3) Yes, you can create a view with custom search form, filter by the taxonomy "Resource Type", and display the search form insider in sidebar, and display the search result in the content area, see our document:
https://toolset.com/documentation/user-guides/front-page-filters/

Relevant Documentation:
https://toolset.com/documentation/views-shortcodes/#wpv-for-each
https://toolset.com/documentation/user-guides/front-page-filters/

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 community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Chris 7 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#557329
My Layout.png
Single View Page.png

I have two custom post types, Stories & Resources. Both have file upload fields called "resources" for people to upload documents to. I have a shared taxonomy called "resource type".

1.) I want to have a template for each CPT that will show the page content, then list all the attached files that were uploaded so people can see and download.
2.) I want to have a listing page that shows both CPTs in date order.
3.) I want a sidebar with the "Resource Type" so people can filter the listing page.

I hope this makes sense. I can give you access to my site but this seems like it would be simple for you.

Let me know.

#557515

Dear Chris,

Q1) I want to have a template for each CPT that will show the page content, then list all the attached files that were uploaded so people can see and download.
How do you setup the custom file field "resources", is it a multiple instance field? if it is, you can use [wpv-for-each] shortcode to display it as what you want, see our document:
https://toolset.com/documentation/views-shortcodes/#wpv-for-each

Q2) I want to have a listing page that shows both CPTs in date order.
Yes, it is possible within Views plugin, you can try this:
1) Create a view, query posts of both custom post type Stories & Resources
2) Oder the result by the post date,
See our document:

Q3.) I want a sidebar with the "Resource Type" so people can filter the listing page.
Yes, you can create a view with custom search form, filter by the taxonomy "Resource Type", and display the search form insider in sidebar, and display the search result in the content area, see our document:
https://toolset.com/documentation/user-guides/front-page-filters/

#557778

Yup, that worked great. And, thanks for sending me to the User Guide. That was very helpful. Last thing (that I could find) is the file output is showing the full url, which will be great for creating a download link, but I'd like to display the file name as well.

I think I can build a link but not sure if there is a shortcode to display that items name.

Thanks! Loving this so far.

#557795

The forum ‘Types Community Support’ is closed to new topics and replies.

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