Skip to content

AMP-31189: Add _embed=true to getPages, matching getPosts - #84

Merged
jdeanquin-dg merged 1 commit into
amp-main-stablefrom
fix/AMP-31189-og-tags-embed-pages
Sep 7, 2026
Merged

AMP-31189: Add _embed=true to getPages, matching getPosts#84
jdeanquin-dg merged 1 commit into
amp-main-stablefrom
fix/AMP-31189-og-tags-embed-pages

Conversation

@jdeanquin-dg

Copy link
Copy Markdown
Contributor

Pages never resolved featured-media data via _embedded, unlike posts which already request _embed=true. Needed so page-level OG tags can include a real featured image.

Pages never resolved featured-media data via _embedded, unlike posts
which already request _embed=true. Needed so page-level OG tags can
include a real featured image.
Copilot AI lite review requested due to automatic review settings September 7, 2026 16:37
@jdeanquin-dg
jdeanquin-dg merged commit 65387ac into amp-main-stable Sep 7, 2026
1 check passed
@jdeanquin-dg
jdeanquin-dg deleted the fix/AMP-31189-og-tags-embed-pages branch September 7, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is small, consistent with existing getPosts behavior, and safely composes with both preview and non-preview query-string construction.

Pull request overview

This PR aligns the Pages REST request behavior with Posts by requesting embedded resources (_embed=true) so page responses include resolved featured-media data needed for accurate OG image tags.

Changes:

  • Update getPages query construction to include _embed=true alongside lang=..., matching getPosts.
File summaries
File Description
wp-react-lib/src/api/index.js Adds _embed=true to the pages endpoint query string so featured-media can be retrieved via _embedded.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants