Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
346 views
in Q2A Core by
I noticed the .qa-notice element is hidden in signup page. How was it done? I need to reproduce it to other specific pages.

1 Answer

+1 vote
by
selected by
 
Best answer

Inside your theme's qa-theme.php file, add this function towards the end:

function head_custom() {
  qa_html_theme_base::head_custom();
  if ($this->template == "YOUR_TEMPLATE" || $this->request == "YOUR_URL") {
    $this->output('<style>.qa-notice {display:none !important;}</style>');
  }
}
 
Please note if a head_custom() funtion is already present then you just need to append the contents of above function to it.
by
What kind of information should I enter in YOUR_TEMPLATE and YOUR_URL? I've searched instances of "template" and it seems to refer to subdirectory.
by
In the head_custom() function you can echo the variables:
1. $this->template;
2. $this->request;

to find out their values for each page.

Now if you want to hide .qa-notice of all pages that have template as qa then put this value there and the condition should be:

if ($this->template == "qa") { .......

And so on. You can PM me the link of your site and the pages where you wanna implement this. I will help you out.
...