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
- How does WordPress decide what template to use as frontpage
- When to use esc_url, esc_html, esc_attr, and friends?
- How do I show sticky posts on a static front page that also contains content?
- Best practices – Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- How to disable 3.1 “Admin Bar” via script for the admin user?
- Authentication / login mechanism (non wp-admin)
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- How to create custom home page via plugin?
- Front End Post Submit Form
- Feature Survey – What would you want in a resume theme?
- How the WordPress sidebar works
- Should we localize custom-made themes / plugins?
- Change loop order via form or link (jquery, not URL)
- Extend walker – navigation, adding data attribute to a tag
- How can I remove the Static Front Page option from the Customizer
- How to programmatically bring back “excerpts” field in post editor in WP 3.1+
- How can i customize the comment list
- 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”?
- How to handle theme customization and sass variables
- wp_enqueue_scripts not called on search page?
- wp_head() not inserting the default stylesheet style.css
- Upgrading a custom theme through the Dashboard
- First completely customized theme, where should I start?
- WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way
- Theme Customizer not loading
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Modify Javascript Configuration Options for Theme Customizer Colour Picker
- Best practices: Custom theme sidebar menu – hardcode or widget?
- Best approach to create sites with Modular Content? [closed]
- Modify the Additional CSS section (adding a disclaimer)
- WP Multisite Static Frontpage
- What’s the best action to use when you want to do something only once per theme setup?
- 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]
- Customizer API and add_panel(). Panel doesn’t show
- How to correctly add JQuery in a WP theme?
- Creating multiple hooks for theme
- What is the best way to handle multiple calls to get_template_directory_uri() and similar functions?
- Why is the Links Manager visible?
- Disable front-page.php template
- 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
- Removing non native customizer settings from a child theme
- How to reorganize the items returned by wp_list_comments()?
- How to make Home Menu( Front Page) use index.php instead of page.php
- which is the best way to customize nav-menu-template.php?
- 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 do I Add images uploaded in the post to a default custom field
- How to add a button which saves the post then executes a function
- Limitations when modifying wp_title with a filter
- How to make animated intro?
- How to edit theme functions file to modify pagination?
- 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]
- “Add A Widget” button in the Customizer
- Zoom on custom theme without child
- Customizer: save setting/control content to post/page
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- Move default page templates to sub directory
- Changing a slider to a grid [closed]
- Custom Navigation build using wp_nav_menu and walker
- Using My Own Classes On Wp Unit Tests
- Is it possible to visually group items on the theme customizer?
- Page-loop is looping content from custom loops on the same site. How to avoid that?
- How to Find the Page the Front Page is Using?
- Custom Blocks as part of a theme
- Customize how a WordPress theme looks like in the Theme Selector
- WooCommerce: multiple input field for multiple product variations
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Integrate WooCommerce theme with a WordPress theme [closed]
- How can I conditionally show different home page templates based on whether or not the user is logged in?
- Widget Option is Missing
- How do you use WordPress for a website that’s not in a blog format?
- Default Text not showing from customizer