Skip Navigation

[Resolved] Custom posts not deleting

This thread is resolved. Here is a description of the problem and solution.

Problem:
The issue here is that the user deleted their CPT but didn't delete the posts of that CPT so they are still in the database. They were wondering why.

Solution:
This is actually a normal function. Deleting the CPT in Types doesn't delete the posts themselves. This is actually because in the even that you delete the CPT by accident all your posts are not lost.

The correct way to do this is to delete the posts first then delete the CPT.

In your case you can just re-create the CPT in Types with the same slug then you can just delete the CPT again once you've deleted the posts.

0% of people find this useful.

This support ticket is created 6 years 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by chrisK-12 6 years ago.

Assisted by: Shane.

Author
Posts
#1180849

Hello,

I made a custom posttype. I put some posts in it and then i deleted the posttype. The posts did not delete automaticaly.
I can still see the posts in my google maps markers, but when i click on the link i get redirected to the homepage. I want to remove the google maps markers, but i can't figure out how.

The link to the problem:
hidden link

If you click on the marker 'testwijn 4' for example, you get redirected to the homepage, but the URL remains like it's the post.

Can you help me with this problem?

Thanks in advance

-customer

#1180859

Shane
Supporter

Languages: English (English )

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

Hi Chris,

Thank you for contacting our support forum.

This is actually a normal function. Deleting the CPT in Types doesn't delete the posts themselves. This is actually because in the even that you delete the CPT by accident all your posts are not lost.

The correct way to do this is to delete the posts first then delete the CPT.

In your case you can just re-create the CPT in Types with the same slug then you can just delete the CPT again once you've deleted the posts.

Please let me know if this helps.
Thanks,
Shane

#1180864

Hello,

I just remade the CPT with the exact same name and slug, but it doesn't show any posts.

-customer

#1180868

Hello,

My apologies. I accidentally used the wrong slug. Now I used the right slug, but I can't create the CTP because the slug is reserverd

-customer

#1180889

Shane
Supporter

Languages: English (English )

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

Hi Chris,

It could be that there is something in your system that is using the slug already.

Could you disable all your non-toolset plugins and try again ?

Also if you have a custom user role called customer could you disable the access plugin so there is no reference to the slug and then try again.

Thanks,
Shane

#1181349

Hello,

I disabled all the non-toolset plugins and tried again, but it didn't work. I don't have a cutom user role, but I still tried what you said. This also didn't work. I get the same error message as before.

-customer

#1181532

Shane
Supporter

Languages: English (English )

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

Hi Chris,

Would you mind allowing me to have admin access to the website so that I can check on this for you ?

Thanks,
Shane

#1182156

Hello,

I've found another solution for my problem, so I don't require your help anymore.

Thank you for the help you've given me.

-customer