• Resolved mc_deimon

    (@mc_deimon)


    I installed the plugin in a theme that publishes classified ads. The problem is that I do not detect the publication of this type of post to offer rewards. What I can do?

Viewing 1 replies (of 1 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @mc_deimon

    Intentionally we make new content publishment restricted to post and pages, simply because there are the two main elements coming from a clear install, probably you will think, why?

    When we build this feature, we have in mind other integrations like WooCommerce

    On a standard blog, probably your authors are blog post writers, but on WooCommerce, your auhtors are vendors, for that we want a separate handler for content creation, because is not the same a blog post than a store product

    Anyway, there is a snippet to add support for any CPT (Custom Post Type) you want:

    // Example of register a CPT creation and deletion as events
    function my_prefix_activity_triggers( $triggers ) {
    
    $my_prefix_post_type = 'custom-post-type';
    
    $post_type = get_post_type_object( $my_prefix_post_type );
    
    $triggers[__( 'My CPT Events', 'gamipress' )] = array(
    "gamipress_publish_{$my_prefix_post_type}" => sprintf( __( 'Publish a new %s', 'gamipress' ), $post_type->labels->singular_name ),
    "gamipress_delete_{$my_prefix_post_type}" => sprintf( __( 'Delete a %s', 'gamipress' ), $post_type->labels->singular_name ),
    );
    
    return $triggers;
    
    }

    Just replace the value of ‘custom-post-type’ by the CPT you want (for example ads)

    Best regards

Viewing 1 replies (of 1 total)
  • The topic ‘type of post’ is closed to new replies.