Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
507 views
in Q2A Core by

1. I have used EQF plugin as specified here. But how can i show the custom field just below the question title?

(just below horizondal seperator with custom font size)

2. How can i append the custom field value with page meta title?

 

Q2A version: 1.6.3

1 Answer

+1 vote
by

I may not understand your demand definitely...

1. Show on question page

Admin > plugins > EQF option > Show on question page:

2. Title on question page

Admin > plugins > EQF option > Label on question page: <== "Company Name:"

3. Position on question page

It is only lower 3 places now.

Admin > plugins > EQF option > Position on question page:

  • Upper content
  • Inside content
  • Lower content

4. Display method in any place of question page:

You should add code below to suitable function of your theme.php (Example: Under title).

function page_title_error() {
  qa_html_theme_base::page_title_error();
  if($this->template == 'question') {
    $number = 1; // *** Set your EQF plugin option number. e.g 1, 2, 3 ... ***
    $postid = $this->content['q_view']['raw']['postid'];
    $label = qa_opt('extra_field_label'.$number);
    $value = qa_db_single_select(qa_db_post_meta_selectspec($postid, 'qa_q_extra'.$number));
    if(!empty($value))
      $this->output('<p class="eqf_item'.$number.'"><span class="eqf_label">'.$label.'</span><span class="eqf_value">'.$value.'</span></p>');
  }
}
 
...