I have a content type as questions. So its comments need to be renamed as answers. How can this be done. While i also need the comments for article section..

Comments

sakib000’s picture

Try this,

Add this code in your themes template.php file. If there is no such file in your theme directory, its time to create it.

<?php
function THEME-NAME_preprocess_comment_wrapper(&$vars) {
  if ($vars['content'] && $vars['node']->type == 'SYSTEM_NAME_OF_YOUR_CONTENT_TYPE') {
    $vars['content'] = '<h2 class="comments">'. t('Answers') .'</h2>'.  $vars['content'];
  }
}

Make sure you change 'THEME-NAME' with your theme name and 'SYSTEM_NAME_OF_YOUR_CONTENT_TYPE' with system name of content type on which you want it.

hiker1989’s picture

No sir! it didn't work. I use ad_novus fluid theme. i tried the template.php file in both ad_novus folder & its child ad_novus-fluid folder. so i used ad_novus and ad_novus-fluid as theme name respectively. In the later option, it showed error for that - while in the former case, no changes were visible

hiker1989’s picture

Can someone help me out of this issue

hiker1989’s picture

I have tried it on giordani & alagna also. But no change .........

picxelplay’s picture

hiker1989’s picture

Can i do it for Alagna....
I want to replace the "Add new comment" with "post answer" for question content type, while it'll remain as is for other types..