Saltar navegación

[Resuelto] Old View Templates

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
I cannot delete Content Templates that are used as loop items in a View.

Solution:
1. Create a View
2. Add some contents to the loop
3. Add a Content Template with the Loop Wizard to the loop as well
4. Save everything and then delete (trashed and delete) the View

The content template is not present in the related list anymore.

This is the only way to delete such items.

This support ticket is created hace 7 años. 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)

Etiquetado: 

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Stephen Vaughan hace 7 años.

Asistido por: Beda.

Autor
Mensajes
#595851

Hi,

Something you may be aware of already. When I delete views I notice that any template that may have been created is still listed under templates and can't be deleted. I have to go into phpMyAdmin and gingerly removed, which is probably not the friendliest UX or safest way to do so.

Suggestion. Do we really need to list templates, generated by Views, in the Templates list?

Stephen

#595908

I have seen those reports in past, and was never able to replicate this.

That is why most of the related tickets will end with no solution.

I tried again, and again I failed.

1. I created a View
2. I added some contents to the loop
3. I added a Content Template with the Loop Wizard
4. I saved everything and then deleted (trashed and deleted) the View

The content template is not present in the related list anymore.

Can you confirm you follow the exact same steps?

#595915

Hi Beda,

I see what was happening. If I don't delete the view permanently, the template remains. Delete the view permanently and the template goes as well.

One more thing though. On many sites I have built for artists I will, for example, categorise their work by year. To display all work I would make a view archive, a grid of thumbnails, lets say. I then duplicate it for each year, filtered to the specific year categories I have created. I then have custom post types for each year or period with the shortcode for each year view.

This works well, although not particularly DRY in terms of duplication because although loop item is the same for every one, a template is created fro every modified duplicate archive view.

At the end of the day, I won't lose much sleep over this. As I said it gets the job done.