0

I am developing this theme, and their are features that I need them in all of the page except for the single and front page. So I've used this conditions

If ( is_page() || is_home() ): ?>
//My features here
endif;

But I find this code is including the home page, is there any way to go about this?

1 Answer 1

1
if ( !(is_page() || is_front_page()) ) {
/* These features will not be visible on front page and on single pages. */
}

If you want to hide something only on the front page regardless the front page is a static page or list of blog posts then use this code:-

 if ( !(is_front_page()) ) {
 /* These features will not be visible on front page. */
 }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.