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

I modified qa-theme-base.php file - I inserted path to custom footer.php file. It worked fine, but below the footer appeared symbol "1". How to removed it?

Thank you,

Anton.
Q2A version: latest

2 Answers

0 votes
by

I am guessing here, but it sounds like you are trying to echo or output a function that already outputs code itself. For example, if you do

echo print_r('Hello');

Then print_r will display Hello, then echo will display whatever the print_r function returns (usually 1 or 0). In which case you'd just need to remove the "echo".

If that's not it, please edit your question to put the relevant code in, otherwise we are really just taking guesses.

asked Jan 27, 2012 in Q2A Core by anonymous
closed Jan 27, 2012
theme modification problem
by
In other words, I just want to insert "custom_path/footer.php" in qa-theme-base.php file, but I don't know in which line and which exactly code a I have to enter. Any help?
0 votes
by

Maybe this will work for you?

        ob_start();
        include('/path/to/file');
        $contents = ob_get_contents();
        ob_end_clean();
        echo($contents);

just put it in one of the theme functions of your theme's qa-theme.php file, don't modify the actual qa-theme-base.php, because it will be erased on upgrades.

by
Thank you for your help. I tried it, but the footer is inserted in the top of the page, just below the header. Any ideas?
by
Learn HTML :P

If it's showing up at the top of the page, you're inserting it in the wrong part of the DOM.  It should be inside the qa-footer div, I would think.  try replacing the footer function in your theme.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...