Support » Plugin: Disable Comments » Plugin doesn’t recognize all active custom post types

  • Resolved Vane

    (@vanetreg)


    Hi,

    I have 2 custom post types (CPT) and I want to disable comments for one of them, but that one is not listed on plugin’s setting page!
    Posts, Pages , Media and one of my CPTs are listed, but not the other I want to disable comments for.
    Both CPT’s are active, working properly on frontend etc.

    Pls. note these CPTs were created with Toolset and they are in a one-to-many relationship.
    I want to disable comments for the “parent”, but this is not listed.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Samir Shah

    (@solarissmoke)

    Has your second custom post type explicitly declared that it supports comments? See https://toolset.com/forums/topic/how-to-add-comments-to-custom-post-type/

    • This reply was modified 6 months ago by Samir Shah.
    Vane

    (@vanetreg)

    I’m not sure whether that it explicitly declared, but (AFAIK) it is declared the same way for both and one is shown and one is not in your plugin’s CPT list.

    Both has the exact same settings in Toolset CPT definition.
    This is why I referred to the CPT relationship, because it is the only difference between them what might cause the difference.

    This is where the specific CPT settings are explained:
    https://toolset.com/documentation/user-guides/custom-content/create-a-custom-post-type/

    Pls. note the Comments section here:
    https://toolset.com/wp-content/uploads/2011/10/custom-post-type-sections.png
    refers to set in on individual level, not on CPT level.

    • This reply was modified 6 months ago by Vane.
    • This reply was modified 6 months ago by Vane.
    • This reply was modified 6 months ago by Vane.
    Plugin Author Samir Shah

    (@solarissmoke)

    The plugin isn’t doing anything fancy – it just fetches all post types that have declared support for comments.

    It’s very hard to debug this without seeing the underlying code that Toolset uses to generate these post types dynamically. As Toolset is proprietary software, that is not easy to do, so I’m afraid this is unlikely to be fixed by me.

    If someone from Toolset is willing/able to either explain what their code does when creating many-to-many related post types, or submit a pull request to this plugin for compatibility with Toolset, then I’m happy to look into it.

    Vane

    (@vanetreg)

    After investigating it I think your plugin lists only the post types which has comments enabled, so it doesn’t list what are explicitly disabled by 3rd party (WP, Toolset, whatever).
    Unfortunately the Toolset thread’s solution is not valid anymore with Gutenberg and Toolset’s latest versions.
    Thank you,
    I really appreciate your help, I change topic’s status to “Resolved”.

    • This reply was modified 6 months ago by Vane.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin doesn’t recognize all active custom post types’ is closed to new replies.