Skip Navigation

[Resolved] Manage Custom Post Type Created by Another Plugin

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

Problem:
How can I get control of Custom Post Types created by another plugin?
I am using Educator plugin: https://educatorplugin.com

Solution:
Please follow this doc: https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/

Basically you need to:
- Enable 3rd party custom post type first (or enable theme / plugin) so that it can be managed by Types.
- Then please deactivate your theme or plugin that generated that CPT.
- Create same CPT in Types with same slug -- this is important.
- And then reactivate your theme or plugin (after CPT has been created in Types).

Now you will be able to see CPT of that 3rd party theme or plugin into Types and it will be editable. And all your posts or data will still be there.

Relevant Documentation:
https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/

This support ticket is created 7 years, 3 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 10 replies, has 2 voices.

Last updated by johannaH 7 years, 3 months ago.

Assisted by: Noman.

Author
Posts
#549424

I am trying to: get control of CPTs created by another plugin

I followed the instructions in this thread

https://toolset.com/forums/topic/types-added-by-other-plugins-are-not-showing/

but as far as I can see the CPTs are not registered in the theme's functions.php file

Is there another approach I can use? is there some code you can give me to adapt?

My client has a complex future plan for her website and the plugin she wants to use for the first phase doesn't have the ability to add the extra data types. I was hoping that I could use the plugin for quickness then use WP-Types to grow out the additional functionality and data structures needed for the subsequent phases of her project.

Thanks

#549429

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Johanna,

Thank you for contacting Toolset support.

Please follow this doc: https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/

Basically you need to:
- Enable 3rd party custom post type first so that it can be managed by Types.
- Then please deactivate your theme or plugin that generate that CPT.
- Create same CPT in types with same slug -- this is important.
- And then reactivate your theme or plugin (after CPT has been created in Types).

Now you will be able to see CPT of that 3rd party theme or plugin into Types and it will be editable. And all your posts or data will still be there. Thank you

#549438

Thank you for the quick reply, but if you read my original post you will see that I HAVE tried to follow those instructions.

The help ticket I referred to contains a link to the knowledgebase article you refer to.

I have looked in the functions.php file of my theme and there is no reference to custom post types of any sort

I do not know therefore how to "Remove the PHP that declared these custom types" or "Enable 3rd party custom post type first "

Should I just skip those steps, deactivate the plugin that has the CPTs, create them in Types then reactivate the plugin?

Thanks

#549439

While waiting for your follow up reply I decided to have a go at what I could.

Having deactivated the plugin, created the CPTs then reactivated the plugin I ended up with Toolset recognising the CPTs created by the plugin AND a set of additional Toolset CPTs

So it seems that the answer - and perhaps the first step anyone should try - is after installing Toolset, to deactivate then reactivate any plugins that are already installed and which created CPTs

#549440

Though it is worth notiing that the plugin CPTs ONLY appear in Toolset Dashboard - they do NOT appear under the Post Types screen!

#549455

Actually when I look into it more I realise that there is still a problem

With the plugin's CPTs not showing up in the Toolset list of Post Types, I am unable to build any relationships to other CPTs I am creating

Can you confirm whether, if all is working properly, that any plugin CPTs SHOULD BE in my list of Post Types or is the limit of Toolset that they will only appear in the Dashboard in order for you to create views, layouts etc for them?

If the former, then how can I get this happening for my plugin CPTs?

Thanks

#549477

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Any CPT that is registered using standard WP method will be able to work this way. And it should appear in Post Types screen, I tested this few days ago with Avada theme & another plugin.

So there is possible chance that your plugin is exclusively not allowing to edit its settings or it has more complex setup which is denying any other plugin to modify. So basically there is no such limit of post types being appearing only in one section (from Toolset point).

Which plugin you are using that is having this issue and is it free or paid plugin?
Thank you

#549485

Hi Norman

It is the Educator plugin - hidden link

It's a free one that creates three custom post types - courses, lessons and membership types.

My quick look through the plugin files didn't spot an obvious place that CPTs were being defined and enabled. Perhaps your more expert eye can spot where this is being done and see whether it's a possibility to get 'proper' control of the CPTS with Toolset.

My client wants the functionality this plugin offers but her site will also have lots of other aspects and hence CPTs. The budget doesn't allow for me to recreate all the functionality of the plugin so my hope was that if I could control the CPTs with Toolset, I might be able to use this plugin then build the other site areas with Toolset and be able to tie them all together using relationships etc

Any help you can offer in achieving this would be much appreciated.

#549524

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for letting us know about the plugin and more details. I am going to test this at my end and see what happen, will update you accordingly soon.

Thank you

#549565

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have just tested this at my end and following the steps given above, I was able to see and edit all 3 post types just fine in Toolset >> Post Types screen: edr_membership, edr_course, edr_lesson

I have also checked by creating parent-child relationship, please see this video here as demo:
hidden link

Please double check that slug names match exactly same as original post types and use underscore “_” and not “ - “ (by default types will name the slug as edr-lesson which is not correct, right one is edr_lesson).

Thank you

#549899

Thanks Norman

That's working fine now.

I realise I was just using courses, lessons and memberships as the slugs as that is how they appeared in the URLs when I created one of each (https:/mysite.com/courses/test-course-1 etc)

Not sure where you discovered the edr_ prefix but thanks for doing so.