Skip to content

fix(frontend): remove hentry from Tour Operator posts - #1427

Merged
krugazul merged 1 commit into
developfrom
fix/schema-remove-hentry
Nov 23, 2026
Merged

krugazul merged 1 commit into
developfrom
fix/schema-remove-hentry

Conversation

@krugazul

Copy link
Copy Markdown
Collaborator

What

Removes the hentry class from Tour Operator posts on the front end. This covers tours, accommodation and destinations, plus any extension post types registered through lsx_to_post_types (reviews, specials, team).

Why

WordPress core's get_post_class() always adds hentry for hAtom microformats. The Post Template block inside every Query Loop uses it, so each related tour, destination or accommodation item on a page carries hentry. validator.schema.org reads these as hAtom blog entries and flags them for missing entry-title, updated and author. One example is the related destination and tour loops on /accommodation/bagatelle/ on dev.

Tour Operator content is described by its JSON-LD schema, so the hAtom class only adds noise to the validator.

How

  • Frontend::remove_hentry() is hooked to post_class on the front end only, inside the existing ! is_admin() block.
  • It acts only when the post's type is a Tour Operator post type. Other post types, such as blog posts, keep hentry.
  • New filter lsx_to_remove_hentry ( bool $remove, int $post_id ) keeps hentry for a given post if a site needs it.
  • Changelog entry under Unreleased › Fixed.

Testing

On beta.local (WordPress Studio), I checked the wp-block-post items on pages that hold query loops:

Page Before After
/accommodation/clouds-estate/ (accommodation and tour loops) hentry on every item none
/tours/, /specials/, /team/ hentry on every item none
/review/rachel-nigel/ (accommodation, destination, team and tour items) hentry on every item none
/hello-world/ (a blog post) hentry hentry, unchanged

php -l and phpcs (repo ruleset) are clean on the changed file.

Reviewer notes

🤖 Generated with Claude Code

WordPress adds `hentry` to every post for hAtom microformats. The Post
Template block in each query loop uses get_post_class(), so every tour,
accommodation and destination item (and extension items such as reviews,
specials and team) was read by the Schema Markup Validator as an hAtom
blog entry missing entry-title, updated and author.

Remove `hentry` from Tour Operator post types on the front end; their
JSON-LD schema describes them. Other post types keep it. A new
`lsx_to_remove_hentry` filter can keep it for a given post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c6dc4b1 and 4102e9d.

Files selected for processing: 2

  • changelog.md
  • includes/classes/legacy/class-frontend.php

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 4

Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"; Unrecognized key: "enabled" at "knowledge_base.learnings"; Unrecognized key: "enabled" at "knowledge_base.issues"; Unrecognized key: "enabled" at "knowledge_base.pull_requests"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-project-automation github-project-automation Bot moved this to Needs Triage in Tour Operator Nov 23, 2026
@github-actions github-actions Bot added status:needs-review Awaiting code review type:bug Bug or defect priority:normal meta:needs-changelog Requires a changelog entry before merge labels Nov 23, 2026
@krugazul
krugazul merged commit 1b4b58b into develop Nov 23, 2026
4 of 5 checks passed
@krugazul
krugazul deleted the fix/schema-remove-hentry branch November 23, 2026 11:10
@github-project-automation github-project-automation Bot moved this from Needs Triage to ✅ Done in Tour Operator Nov 23, 2026
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

TO-279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta:needs-changelog Requires a changelog entry before merge priority:normal status:needs-review Awaiting code review type:bug Bug or defect

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant