- Web templates
- 3 Color Templates
- CSS Templates
- Dynamic Flash
- Dynamic Flash Photo Gallery
- Flash Animated Templates
- Flash CMS Intro
- Flash Intro Templates
- Flash Templates
- Dynamic SWISH Templates
- Full Package Templates
- Full Site templates
- JS Animated
- PSD Template
- Razor-Templates
- Stretched Template
- SWISH Animated templates
- Swish Templates
- XML Flash Templates
- PRO templates
- Responsive web templates
- Bootstrap Templates
- E-commerce Templates
- CMS & Blog Templates
- Corporate Design
- Silverlight
- Video Templates
- Facebook Layouts
Leave a suggestion
WordPress. How to enable comments for custom posts.
This tutorial shows how to enable comments for the custom posts in WordPress.
1) Open "wp-content/themes/themeХХХХ/includes/theme-init.php" file, and search for the functions that creates custom posts type:
/* Services */ function my_post_type_services() { register_post_type( 'services', array( 'label' => __('Services'), 'public' => true, 'show_ui' => true, 'show_in_nav_menus' => false, 'menu_position' => 5, 'rewrite' => array( 'slug' => 'services-view', 'with_front' => FALSE, ), 'supports' => array( 'title', 'thumbnail', 'editor') ) );2) In the ‘supports’ array add ‘comments’:
Now you can access custom posts via the WordPress admin panel and enable comments in the Discussion section.
3) If you still don’t see coments check what single post template is used. For example if the custom post use such single post template files as single-testi.php, single-team.php etc you need to enable comments in those files. To do this please add the following line where you want comments to be displayed: