Hi guys, this is my 100th soft reject, well, can you help me with this issue please? this is the review:
Any item in header/footer area that is a function should be moved into functions file. Otherwise theme might have issues when users overrides with custom templates via child theme. Example(s) from your code and there are more: https://redpen.io/ja086ccacf288ec5ed
that is a piece of my header.php code, I am not defining functions in header.php. only I am calling it, or maybe the reviewer is saying that I can´t call functions in header.php and footer.php?
can someone tell me what I need to do? it is in redpen
Just make a function out of all the variables and if else statements( in your header.php) and add in functions.php and call that function in your header.
That will prevent your variables getting stuck just in parent header.php and will be more child theme friendly
I have received the following as soft reject points:
Any item in header/footer area that is a function should be moved into
functions file. Otherwise theme might have issues when users overrides
with custom templates via child theme.
here is our header code
here is footer code
can you please or any one explain how we can fix this or point out what the comment does it mean
I think what they want is for all php code in your header page like the if statement to be in a function. and the function to be called from the header.php file.
Word of warning, you’re going to get pulled for the use of the Global variable the footer. They may not have mentioned it to you yet ( they seem to like to play these games of only telling you bits and pieces at a time ), but they will.