Skip Navigation

[Resolved] How do I show a last modified date column in views Admin screen

This support ticket is created 5 years, 12 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 3 voices.

Last updated by justinG-2 5 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1160780

In the Admin page of the views Plugin is there an option or can I use custom code to show the last modified date of a view. This would be helpful as often times I may be working on alternate versions of a view with a similar name and seeing which one was most recently modified helps to identify them and track changes.

#1160837

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Justin,

Thank you for contacting our support forum.

Unfortunately we don't have a way to do this. Custom code would be the best route here, but if it helps, your views are stored in the wp_post table and there is a column that stores the last modified.

So some custom code would be needed to add this.

Thanks,
Shane

#1165500

Hi Shane, thanks for your followup and sorry for the late reply.

So in regards to the custom code would it be possible to use the manage_posts_custom_column found here? - https://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column

Are "views" essentially a custom post type? And are there any hooks the in the toolset API that could be used in conjunction with this?

#1165534

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Justin,

Essentially, yes views are custom post types .

With regarding an API that can be used with this, unfortunately i'm not aware of any that can be used for this.

Essentially anything that would get this to work would be completely custom and would be needed to hook into the views CPT.

From what I can see the API function here
https://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column

Should be able to work for this.

Thanks,
Shane

#1165635

Ok, What's the name of the Views Custom Post type that I should use in the filter:
manage_${post_type}_posts_columns ?

I'm using 'view' as the custom post type name like so, but the column doesn't show up.

add_filter('manage_view_posts_columns', 'my_modfied_view_column');
#1167767

Hi, Shane is on holiday and I'm looking over his queue. I can see that you would like to add a column to the Views admin screen, but unfortunately there is no API available to filter these columns. With public post types, you can use the API Shane mentioned. However, Views are private post types registered by Toolset and as such they are not filterable using standard WordPress column APIs. If you'd like to request the ability to add columns, feel free to submit a feature request at the following link: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#1167853

Hi Christian, thanks for following up with this. Much appreciated 🙂

I will consider making this a feature request.

#1167854