I need use is_single in functions.php
is_single most likely only works inside of The Loop, and functions.php loads before you’re in The Loop. You could try something like this: add_action( ‘wp_head’, function(){ var_dump(is_single()); }); And now you see that is_single() returns true. EDIT: I was probably off for suggesting it only works inside The Loop, but there’s definitely better places for … Read more