Should I write a PHP function in home.php?

At the risk of getting voted down by everybody else here who thinks this is OK. I say: No, you shouldn’t define functions in template files. This should be considered bad practice. Let’s have a look at the documentation: Functions File Explained. The functions file behaves like a WordPress Plugin, adding features and functionality to … Read more

Multiple is_page() in page.php

You can pass an array of IDs to is_page instead of using multiple is_page: if( is_page( array( 11, 22, 33, 44 ) ) ) { // Your code } Also, if you are using it in a loop, you should consider this note: Due to certain global variables being overwritten during The Loop, is_page() will … Read more