Skip to content

Instantly share code, notes, and snippets.

@JoeHana
Last active December 15, 2015 10:59
Show Gist options
  • Save JoeHana/5249953 to your computer and use it in GitHub Desktop.
Save JoeHana/5249953 to your computer and use it in GitHub Desktop.
Enable comments on properties
<?php
/**
* Enable comments on properties post type
*/
add_filter('wpcasa_post_type_args_property', 'custom_post_type_args_property');
function custom_post_type_args_property($args) {
$args['supports'] = array( 'title', 'editor', 'author', 'thumbnail', 'custom-fields', 'revisions', 'excerpt', 'comments' );
return $args;
}
/**
* add comments template to single properties
*/
add_action('wpcasa_property_widgets_after', 'wpcasa_get_comments_template', 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment