Skip Navigation

[Resolved] View for custom post type

This support ticket is created 2 years, 11 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
- 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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 2 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#2314559

Tell us what you are trying to do?
transportationmanagement.net is a development site. It's a multisite install and I am working on the site at the URL transportationmanagement.net/tam
I am using the plugin Download Monitor - hidden link - to create a special private directory for users to upload non-public media files. This plugin creates the custom post type called 'downloads' associated with each media item. I would like to create a view that gives authorized users a listing of all 'download' type posts .

However, I cannot select the 'download' custom post type when building the view through the GUI. It does not appear in the checkbox list of post types

Toolset is able to create custom field groups that apply to 'download' type posts. This is to say, the the 'download' type posts are 'visible' to types. Is there a way to get views to recognize the 'download' post type? Or a way to use a post type slug or something for the view I am trying to create?

Thanks

#2316091

Hi,

Thank you for contacting us and I'd be happy to assist.

Views can only access public post types, and it seems that the post type created by Download Monitor is not public. If you want to override this, you can add your own code to change the Download Monitor post type to be public:
( source: hidden link )


add_filter( 'dlm_cpt_dlm_download_args', 'register_download_func', 10, 2 );
function register_download_func($args){
    $args['public'] = true;
    return $args;
}

Important note: I'll recommend getting in touch with the Download Monitor support team to confirm if there is any drawback or side effect associated with making the custom post type public.

regards,
Waqar