Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
556 views
in Q2A Core by
Due to the malfunction of q2a-print master plugin, I did a button which execute the printing of the html page. Now in that page I would like to hide some elements such as menu, buttons, forms and so on.

I did a new css called qa-styles_print.css and I put it in the theme's folder. Now I have the problem to include this css in the core of q2a (I would like to say in the qa-theme-base.php file).

Any suggestion?
Q2A version: 1.6.3

1 Answer

+2 votes
by

Two options:

1. Copy the CSS into the regular stylesheet (qa-styles.css) and wrap it in a media query.

@media print {
    /* your CSS */
}

2. Override the head_css function in your qa-theme.php

public function head_css()
{
    parent::head_css();
    $this->output('<link rel="stylesheet" href="qa-styles_print.css"/>');
}

 

by
edited by
I tried with the first solution without any results. Maybe because I didn't know how to specify the switch of the css. Now I tried your second solution pasting the code in the qa-theme.php file into my theme folder but it seems to be the same :(
(I also added the " media="print" " string)
Does it works on your test?
...