Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
547 views
in Q2A Core by

How to reanrrange the order of meta elements WHAT WHO WHEN differently on comments, Knowing that this order is set in the language file , is there any hack to make this order change with specific context

Specificaly what i  want to acheive is :
 

On answers/question the meta stays as default
WHAT^WHEN^WHO

On comments:
WHO^WHEN

 

Thanks !

Q2A version: Latest

1 Answer

0 votes
by

I think the best way would be to override the post_meta function in your custom theme. The ordering depends on the value of $post['meta_order']. I think something like this should work:

function post_meta($post, $class, $prefix=null, $separator='<br/>')
{
  if ($post['type'] == 'C')
   $post['meta_order'] = '^who^when';
 
  parent::post_meta($post, $class, $prefix, $separator);
}

 

by
Thank you scott ! it returns though an error saying" Undefined index 'type' "
...