Can You Help Me With One Line of PHP in a WP Theme?

4 replies
I have this code
<?php if(is_home()) { include (TEMPLATEPATH . '/home-about.php'); } ?>

It only makes a display appear on the home page. I want that display to appear on all pages. I tried inserting it into the page template, but that didnt work.

How do I reword that code to make it work on all pages, not just the home page?

Thanks
#line #php #theme
  • Profile picture of the author aaron_nimocks
    PHP Code:
    <?php include (TEMPLATEPATH '/home-about.php'); ?>
    that should do it.
    Signature

    My free PSD logs can be downloaded at PSD Bum. Enjoy!

    {{ DiscussionBoard.errors[2262076].message }}
    • Profile picture of the author Wechito
      Originally Posted by aaron_nimocks View Post

      PHP Code:
      <?php include (TEMPLATEPATH '/home-about.php'); ?>
      that should do it.
      Yes. Just skip the conditional if(is_home())
      {{ DiscussionBoard.errors[2262080].message }}
  • That did it.

    Thanks!
    {{ DiscussionBoard.errors[2262190].message }}
  • Profile picture of the author Amaroks
    Good you have it resolved , just wondering if you did not want it to appear on a specific pagethen why the if is_page()
    {{ DiscussionBoard.errors[2277574].message }}

Trending Topics