Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement query to get the usage of different WordPress template types on the home page #150

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

felixarntz
Copy link
Collaborator

@felixarntz felixarntz commented Aug 19, 2024

In recent years, it has been brought up several times to change the WordPress default of showing a blog on the home page by default to showing a static front page instead. This query looks at how common each variant is across the WordPress home pages indexed by HTTP Archive.

This is based on the detection implemented in the httparchive/custom-metrics repository, which relies on the WordPress-generated body classes.

Query results

Row date cms device contentTypeSummary urls
1 2024-07-01 WordPress desktop home-page 3449866
2 2024-07-01 WordPress desktop home-blog 531538
3 2024-07-01 WordPress desktop unknown 380071
4 2024-07-01 WordPress desktop null 15173
5 2024-07-01 WordPress desktop blog 15099
6 2024-07-01 WordPress desktop archive 1429
7 2024-07-01 WordPress desktop singular 493
8 2024-07-01 WordPress phone home-page 4415076
9 2024-07-01 WordPress phone home-blog 742331
10 2024-07-01 WordPress phone unknown 470458
11 2024-07-01 WordPress phone blog 21126
12 2024-07-01 WordPress phone null 12516
13 2024-07-01 WordPress phone archive 2688
14 2024-07-01 WordPress phone singular 637

Summary

  • More than 78% of home pages use a static front page (matches in both mobile and desktop detection). This supports the proposal that it is not a good default to use a blog.
  • There are some edge-cases where some home pages are a blog (i.e. not determined as the home blog), an archive, or singular content. Those are consistently far lower than 1% though, so it's not too relevant for the data. Possibly it happens because HTTP Archive considers some pages as root pages that are technically not the home page of the respective WordPress site.

Copy link
Collaborator

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Approving with some questions.

SELECT
date,
"WordPress" AS cms,
IF(client = "mobile", "phone", "desktop") AS device,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see "mobile" show up in the query results you posted in the description. I'm curious why you've included it here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's aliased as phone, just a personal convention because CrUX uses phone instead of mobile. It's essentially the same.

Comment on lines +36 to +37
CAST(JSON_EXTRACT_SCALAR(custom_metrics, "$.cms.wordpress.content_type.post_type") AS STRING) AS postType,
CAST(JSON_EXTRACT_SCALAR(custom_metrics, "$.cms.wordpress.content_type.taxonomy") AS STRING) AS taxonomy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are either of these return values being used for something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I put them here for reference, so that someone could easily take the query and use those values to get other insights. So mostly helpful for "educational" purposes.

@felixarntz felixarntz merged commit c92d0ea into main Oct 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants