Skip Navigation

[Résolu] Old View Templates

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 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.

Marqué : 

This topic contains 2 réponses, has 2 voix.

Last updated by Stephen Vaughan Il y a 3 années et 9 mois.

Assigned support staff: Beda.



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?



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?


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.