0

Hi there I'm trying to make this code works for more than just home page but I'm getting errors while trying to accomplish it... can someone help me? I'm trying to use this:

<?php if (is_front_page()) {?>
    <div>Flash Gordon</div>
<?php } ?>

But I want to use more just only is_front_page like, if is_front_page oris_archive or if is_search as well. Ho can I do this?

1

You can add OR conditions like this.

<?php if ( is_front_page() || is_archive() || is_search() ) {?>
    <div>Flash Gordon</div>
<?php } ?>
2
  • 2
    Same time frame, :-). Will remove my answer. +1 for beating me :-) – Pieter Goosen Sep 26 '14 at 7:13
  • Sure, no problem. Glad I could help you on this. :) – Robert hue Sep 26 '14 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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