Skip Navigation

[Resolved] Export Custom Post Type Data to User-Downloadable Button on Front End

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

Problem

I want to create my content with Toolset and let my clients or users download it with a Button.

Toolset should provide such a button where I can choose what the users will be able to download with

Solution

This is not possible with Toolset and it has been denied as a feature request in past already.

This is not the scope of Toolset or WordPress, and hence it is out of the scope of implementation.

To export Custom Type Data (Posts, Fields) you can use the WordPress exporter, it's a native WordPress plugin that you can install thru the "Tools > Import/Export" tab in WordPress Dashboard.

But this is not for the Front End, it's in the backend only.

You could, theoretically, use Custom Code to the Views results, then print them in your desired format and present a download link to the user.
But this all needs to happen on the server, with Custom Code.
The Views Results you could get by using the Views API

This support ticket is created 6 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 6 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#621561

Tell us what you are trying to do?
Trying to make it so that when viewing results from a parametric search, those results are also downloadable as csv or xml file with readable headings. The table sorter that I am using with views returns results for different search criteria, then I would like all matching posts in that post type to be exported based on search parameters. Further, I would like it to export all custom fields inside the post, not just the fields that are searchable in the view.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
Probably. Search "Export search results to CSV" on Google and you can probably find something.

What is the link to your site?
hidden link <-- this the particular view I am looking to implement on. Ideally it would be next to / below the 'x entries found' listing above the results table.

Thanks!

#621660

This is not possible with Toolset and it has been denied as a feature request in past already.

This is not the scope of Toolset or WordPress, and hence it is out of the scope of implementation.

To export Custom Type Data (Posts, Fields) you can use the WordPress exporter, it's a native WordPress plugin that you can install thru the "Tools > Import/Export" tab in WordPress Dashboard.

But this is not for the Front End, it's in the backend only.

You could, theoretically, use Custom Code to the Views results, then print them in your desired format and present a download link to the user.
But this all needs to happen on the server, with Custom Code.
The Views Results you could get by using this API:
https://toolset.com/documentation/programmer-reference/views-api/
https://toolset.com/forums/topic/conditional-output-with-found-count-or-items-count/

That is as far you can go with Toolset - providing the data.
But since Toolset is designed to show this data on a website, not only provide it, it's not possible to generate downloadable files of its output, using only native Toolset features.