Custom Post Type Comments
-
Hi,
I’m a little confused about setting up required steps for Custom Post Types. For a start, all my Custom Post Types actually appear in the dropdown list on any ‘…of a type’ triggers such as ‘Comment on a post of a type’ or ‘Publish a new post of a type’.
Yet these don’t work. So following the snippet found here:
https://gamipress.com/snippets/expansions/events-for-create-and-delete-a-cpt/
I was able to get the triggers to work for a Custom Post Type specified there. So what is the purpose of that ‘…of a type’ trigger if it doesn’t actually recognise any of the Custom Post Types in the list?
The snippet linked above also only has triggers for Publishing and Deleting custom post types. How can I register a trigger for Commenting on that custom post type?
I tried this for example but it didn’t work:
"gamipress_new_comment_{$my_prefix_post_type}" => sprintf( __( 'Comment on a %s', 'gamipress' ), $post_type->labels->singular_name ),
Finally, is it possible to add multiple custom post types here in an array instead of creating a new snippet for every post type? What would the formatting be for that?
Thanks very much.
- The topic ‘Custom Post Type Comments’ is closed to new replies.