Viewing 1 replies (of 1 total)
  • Plugin Author zookatron

    (@zookatron)

    Hi Outlawman,

    You can enable comments on your MyBookTable books by adding the following snippet to your theme’s functions.php file:

    function open_mybooktable_comments($open, $post_id) {
    	$post = get_post($post_id);
    
    	if($post->post_type == 'mbt_book') {
    		$open = true;
    	}
    
    	return $open;
    }
    add_filter('comments_open', 'open_mybooktable_comments', 10, 2);

    If your theme does not already provide comment forms on the pages, you can enable that by adding the following snippet to your theme’s functions.php file:

    function add_comments_after_book() {
    	comments_template();
    }
    add_action('mbt_after_single_book', 'add_comments_after_book');

    If you want even more customization, you also can completely override any of the MyBookTable templates by copying all of the files under the /templates/ folder in the plugin files to a /mybooktable/ folder in your theme folder. You can read more about this method from our developer documentation here: https://github.com/authormedia/mybooktable/wiki/Template-System-Overview.

    ~Tim

Viewing 1 replies (of 1 total)

The topic ‘Comments under books’ is closed to new replies.