• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

is_home() not working on functions.php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › is_home() not working on functions.php

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 12 years, 5 months ago by xx0f.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 10, 2014 at 7:35 pm #104496
    xx0f
    Member

    Hi,

    I am using the 'genesis-sample' theme and I am trying to add custom content to my homepage. To do this I have added an action in the functions.php. The code works fine and the content but as I only want to display this on the homepage I have added this:

    if( is_home() ) {
    //display the content
    }

    however on the homepage this is not working. Above the condition I have also tried:

    wp_reset_query();

    But i am getting the same result. Is there any way to only make my action work on the homepage only?

    any help is much appreciated.

    Thanks.

    May 10, 2014 at 8:05 pm #104499
    Brad Dalton
    Participant

    Your home page is your posts page according to your reading Settings.

    Try

     is_front_page()

    Tutorials for StudioPress Themes.

    May 10, 2014 at 8:16 pm #104500
    xx0f
    Member

    Hi braddalton,

    Thanks for your help it works perfectly!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble