Notice: Trying to get property of non-object in
If there are no search results, then it is somewhat expected that the $post variable is empty and there are no properties in it to be used in the if statements. You can prevent the error by adding an if statement to make sure $post is what it is supposed to be before the line … Read more