Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

problem with theme

0 votes
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
asked Jan 26 in Q2A Core by anonymous

2 Answers

0 votes

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.

answered Jan 26 by DisgruntledGoat
theme modification problem
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

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.

answered Jan 27 by NoahY
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?
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.