• Resolved aljuk

    (@aljuk)


    Hi,

    great plugin, but falls short for my needs at the moment.

    Could you possibly add post_type support for comments? I want to use it to create a ticketing system, using the WP comment system for replies.

    Tia.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Could you possibly add post_type support for comments?

    comments are not stored as posts in the db, they have their own table, wp_comments, and therefore cannot be included to map to using WordPress core functionality.

    I want to use it to create a ticketing system, using the WP comment system for replies.

    this plugin is to capture a cf7 form and store it as a post. I don’t understand what you want to do. If you give me some more details, I may be able to help you.

    Thread Starter aljuk

    (@aljuk)

    Hi,

    by “adding post_type support for comments” I simply meant exactly that.

    in its easiest implementation this could involve adding ‘comments’ to $this->post_properties[‘supports’] at line 172 of class-cf2-post-factory.php

    I want clients of my web design business to be able to create support tickets (posts of a custom post type called ‘ticket’) on my customer support website. Having the WP comment system available for that post type, and echoing their tickets out on the front end in their client area, means we can both view the tickets and reply to each other – i.e. a ticket system.

    Aside from post_type support for comments, I was unable to set different single and archive slugs for the cpt, so couldn’t create the exact implementation I was after. Instead I hand coded the CPT and used Gravity Forms to create the ‘ticket’ posts.

    It works perfectly, but I’d have preferred to use CF7 and your plugin, and very nearly could.

    Thread Starter aljuk

    (@aljuk)

    It’s a really nice plugin, I would just suggest fleshing out the CPT implementation a bit, with all the possible options.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I want clients of my web design business to be able to create support tickets (posts of a custom post type called ‘ticket’) on my customer support website. Having the WP comment system available for that post type, and echoing their tickets out on the front end in their client area, means we can both view the tickets and reply to each other – i.e. a ticket system.

    ah, now I better understand, so you have a custom post type ‘Tickets’ and want comments enabled (supported) for that type so you can engage in a conversation.

    in its easiest implementation this could involve adding ‘comments’ to $this->post_properties[‘supports’] at line 172 of class-cf2-post-factory.php

    you can easily achive this using the filter hook provided 'cf7_2_post_supports_'.$post_type ie the hook #1 in the helper box (screenshot #8). Just click and paste the helper code from the link to your functions.php file.

    I was unable to set different single and archive slugs for the cpt, so couldn’t create the exact implementation I was after. Instead I hand coded the CPT and used Gravity Forms to create the ‘ticket’ posts.

    this too can be achieved using the admin hook 'cf7_2_post_register_post_{$post_type}' which allows you to further customise the post registration arguments. I realised I have forgotten to add the helper for this hook, so I am releaseing v4.0.5 with a new helper code #1b.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Feature request – post_type support’ is closed to new replies.