Skip Navigation

[Gelöst] Remove unused Post Types

This support ticket is created vor 5 Jahren, 11 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Dieses Thema enthält 5 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Nigel vor 5 Jahren, 11 Monaten.

Assistiert von: Nigel.

Author
Artikel
#1149067
SS 2018-11-19 at 3.15.43 PM.jpg

Hi,. pls advice, How do i remove this pls. i have more of this . its getting very messy at the back end, during preview i am force to select the options. Thanks

#1149151

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Hi Dee

I'm not sure what you expect to happen here.

Looks like you created a custom post type, made a Layout to use for the archive of that post type, then deleted the post type itself.

So when looking at your Layouts, the Layout for the archive can no longer find the post type, because you deleted it.

When you do that you will need to delete the Toolset content (i.e. Views, templates, Layouts etc.) that use the post type as well, if you are sure you will no longer use that post type (you could re-create it).

#1149213

Hi Nigel.

Perhaps option to remove the post type [with double warning/ confirmations] if not found ?
whats your view ?

#1149269

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

I'm not sure what you mean.

You are seeing those warnings because the post type has already been removed.

I don't think we would want to automatically remove Layouts, Forms etc. where the post type they were set up with has been removed, because they can easily edited to be re-used with another post type rather than bin them and start from scratch.

#1153602

Hi Nigel., so in order to remove those leftovers, can i create a dummy cpt , assign them , then un-assigned them then delete the cpt, will that work ?

#1153764

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Screenshot 2018-11-27 at 11.11.25.png

I must be missing something because this seems like a non-problem.

You register a CPT.
You create a Layout and assign it to display the CPT posts.
You deactivate the CPT.
The Layout still exists, but is assigned to something that no longer exists.

You can either delete the Layout, or edit it and change its usage so that it is used to display something else.

If you want to keep the Layout for some future use, don't want it assigned to any other post type, but don't to see the message that it is assigned to something that no longer is available, then change its usage and just uncheck the post type in question (screenshot).

What you describe sounds more complex than this, and I'm not sure what exactly the problem is.