Comments (3)
A page can meet both conditions. If the settings under Settings->Reading->Your homepage displays are left at default, the home page will return true for both is_front_page()
and is_home()
This is done for SEO purposes, so the H1 tag isn't used twice on a page. Whenever posts are shown on the front page, the site title is an H1 tag. If your blog isn't the front page, an H1 tag is used with this code:
if ( is_home() && ! is_front_page() ) :
?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php
endif;
from gutenberg-starter-theme.
Hi and thanks for your answer @nate-allen :)
I know it's good for SEO but this is not what I meant with this issue.
See the changes I made in the related PR (#75):
https://github.com/WordPress/gutenberg-starter-theme/pull/75/files
Thanks,
Jb
from gutenberg-starter-theme.
@audrasjb Hmm, I don't think this is a bug though. You said:
Nothing can meet the condition below:
if ( is_front_page() && is_home() )
But the default settings (Your homepage displays your latest posts) would meet those conditions.
from gutenberg-starter-theme.
Related Issues (20)
- not identical backend/frontend HOT 1
- Adobe Accessible Mega Menu
- Modernize the dev workflow
- Site Editor question HOT 2
- Gutenberg Demo broken HOT 3
- h5 and h6 span full width HOT 2
- Enqueue /css/blocks.css with enqueue_block_assets? HOT 2
- Alignment of images left or right next to text blocks HOT 2
- Demo broken HOT 2
- Resized image Does not display HOT 3
- Featured Images don't appear, even though the theme supports them. HOT 8
- Search and 404 needs styling HOT 3
- Block color palette names should be translatable HOT 1
- Add contextual color classes for editor color palette colors HOT 1
- Element "Read more" has no max-width applied, as not displayed as block-element
- Not an issue, just an inquiry about Sass functionality? HOT 1
- browser upscaling
- readme.txt inaccurate
- Newbie question HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gutenberg-starter-theme.