ThemeShaper Forums » Thematic

[closed]

Add action/filter only on specific pages?

(4 posts)
  • Started 3 years ago by neonbible
  • Latest reply from neonbible
  • This topic is resolved
  1. neonbible
    Member

    I want to add a special Widget area only on the front page of my site. I have found out to add it in functions.php but it will apply it to all pages of the site. How to only apply it to homepage?

    Posted 3 years ago #
  2. antesark
    Member

    if ( is_home() ) {
    your code here..
    }

    Posted 3 years ago #
  3. neonbible
    Member

    I used is_page and it worked. But is_home would be better, thanks!

    Posted 3 years ago #
  4. neonbible
    Member

    is_home() didn't work. I discovered is_front_page() which done it.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.