1. Customize
  2. Customizations
  3. Enable comments on achievements and ranks

Enable comments on achievements and ranks

GamiPress registers every achievement and rank type as a new post type on your install.

In addition, WordPress provides functions to let you customize which features support a specific post type like excerpt, comments or included the featured image feature.

So, adding support to achievements of an achievement type to the comments feature just requires a few lines like on following code snippet (you just need to replace the your-achievement-type-slug by the achievement type slug you want):

function my_prefix_change_achievement_post_type_supports() {

    add_post_type_support( 'your-achievement-type-slug', 'comments' );

}
add_action( 'init', 'my_prefix_change_achievement_post_type_supports' );

To enable comments feature support to ranks of a rank type check the following code snippet where you just need to replace the your-rank-type-slug by the rank type slug you want:

function my_prefix_change_rank_post_type_supports() {

    add_post_type_support( 'your-rank-type-slug', 'comments' );

}
add_action( 'init', 'my_prefix_change_rank_post_type_supports' );

More information about the add_post_type_support() function here.

How can we help?