is_front_page()
returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Your homepage displays
So if you set about us
as the front page then this conditional will only be true if showing the about us page.
is_home()
return true when on the posts list page, This is usually the page that shows the latest 10 posts.
If the settings under Your homepage displays are left at default then the home page will return true for both is_front_page()
and is_home()
An example of using is_home()
:
- You have set your posts page to a page called News.
- A user navigates there and in the header you want to show additional navigation
- You could use
is_home()
to do this.
Related Posts:
- Set front page as static page [closed]
- Displaying recent post excerpts on static front page
- Theme Development -> Specific Homepage
- 1 post per category on homepage and counting those posts
- 3 x 3 grid of posts on the home page
- What is the advantage of using home.php over index.php for the front page
- Using classes instead of global functions in functions.php
- What are the ADVANTAGES of ORIGINAL wordpress template structure?
- Change admin bar to default:off
- How to change admin bar color scheme in MP6 / WP 3.8 front end?
- Template for individual post designs
- When to use esc_url, esc_html, esc_attr, and friends?
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- Authentication / login mechanism (non wp-admin)
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- Front End Post Submit Form
- Feature Survey – What would you want in a resume theme?
- Change loop order via form or link (jquery, not URL)
- How to add custom template tag in wordpress theme?
- How should I store global information such as a phone number so that it is editable through the CMS?
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Upgrading a custom theme through the Dashboard
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- Modify the Additional CSS section (adding a disclaimer)
- Adding “latest from the blog” to the homepage
- Version control for both Vagrant config and themes being developed [closed]
- how can I remove the sidebar from my wp homepage [closed]
- Why is the Links Manager visible?
- Best way to start becoming a wordpress developer
- Set a static front-page as a landing page programmatically
- How to add a second stylesheet to the editor
- Where should I update_options in a theme?
- WP 3.1 upgrade breaks AutoFocus+ theme
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- Conditional statement to show pagination
- How to make theme elements customizable in wordpress?
- How to create a custom template to admin dashboard
- Showing a list of posts when homepage is custom
- How to make animated intro?
- How to display all subpages and short by year
- Getting custom posts by post id from cutomizer text input
- Disabling Customizer Selective Refresh shortcut icons for selected controls
- JavaScript stops working on selectively refreshed sections one inside the other
- StoreFront product pages: Turn the Short Description section into a kindred tab section [closed]
- Zoom on custom theme without child
- Customizer: save setting/control content to post/page
- Changing a slider to a grid [closed]
- Custom Navigation build using wp_nav_menu and walker
- Is it possible to visually group items on the theme customizer?
- Custom Blocks as part of a theme
- Customize how a WordPress theme looks like in the Theme Selector
- How can I conditionally show different home page templates based on whether or not the user is logged in?
- Widget Option is Missing
- Default Text not showing from customizer
- How to set wp_options in functions.php for removeing the Default Front Page
- How to have content scroll over background
- WordPress Template Part in iFrame
- How to transfer one domain to another domain without losing theme options (customizer)?
- Is there a WordPress boolean for “theme_customizer_active()”?
- How to make theme configurable
- Extending Twenty Eleven Theme
- How to clean up the theme for production?
- Templates without a loop, best practice?
- CSS added through customizer neglects the need of a child theme?
- What is the best way to build home pages with a lot of sections for distributable themes [closed]
- Clearing dummy data before launch
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- Create theme for mobile phones and tablets only?
- Using the media library for theme customization
- Alternatives to handle customizer settings
- Update Specific Key Value in Complex `wp_options` object
- Can’t change theme name
- Remove/Hide a Widget on a Custom Template
- Cart displayed above header
- Custom Static Page to Display Blog Posts in Excerpt Non-Singular Form (is_singular not working?)
- What is difference between add_theme_support and Theme Customization API?
- Is hand coding required at all?
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- how to edit woocommerce checkout page
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- WordPress menu walker – Get parent item text inside end_lvl function
- How to dowload and edit content of a website
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Wonderflux Framework Static Homepage
- WordPress Customizer Help with FontAwesome Icon
- Undefined index: custom_sidebars
- Best strategy for providing theme options using customizer
- page.php is not called when I load a Page
- Support Multiple featured images
- How Does One Create a Global Variable Repository
- What hook to use for loading a custom class extension during Theme initialization?
- How to convert that page to a wordpress template? [closed]
- Allow users to edit home page from WordPress (home.php problems)
- Not Found when using activity stream as front page with BuddyPress
- How do I change the tagline input to textarea?
- WordPress theme Modifications not showing up on live server
- Turning WordPress Into full-featured website?
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- How can i move my product name & price from below thumbnail to be the rollover content in Avada & Woocommerce?
- How to set up a development/staging site to make major changes to the theme then update on the live site?