GEOforge Schema

Description

GEOforge generates JSON-LD schema markup and meta descriptions for the articles it publishes. WordPress strips inline <script> tags from post bodies (KSES sanitization) and hides underscore-prefixed meta from the REST API by default, so neither can be set by an external publishing tool without a companion plugin.

This plugin solves that by:

  1. Registering a _geoforge_jsonld post-meta key, exposed via the REST API for every public REST-enabled post type, that GEOforge writes to when publishing or updating an article.
  2. Printing the stored JSON-LD inside a proper <script type="application/ld+json"> tag in the page <head> on any singular view — posts, pages, and custom post types.
  3. Registering the SEO post-meta keys used by Yoast SEO (_yoast_wpseo_metadesc), Rank Math (rank_math_description), and The SEO Framework (_genesis_title / _genesis_description) for REST API write access, so GEOforge can sync SEO titles and meta descriptions on publish. Each registration uses an edit_post auth check and sanitize_text_field-based sanitization capped at 320 characters. Registration is idempotent — if the SEO plugin already exposes the key for REST, our registration is a no-op.

No configuration required. Install, activate, and any GEOforge-published article will get its schema markup rendered correctly and its meta description handed to whichever SEO plugin is active.

Installation

  1. Upload the plugin zip via Plugins Add New Upload Plugin.
  2. Activate.
  3. Publish from GEOforge as normal — schema will appear in <head> on each article.

FAQ

Do I need GEOforge to use this plugin?

The plugin is designed to render JSON-LD that GEOforge writes during publish. It will work with any tool that writes a JSON-encoded string to the _geoforge_jsonld post-meta key via the REST API, but on its own it does nothing — there is no admin UI for entering schema by hand.

Will this conflict with Yoast SEO, Rank Math, The SEO Framework, or All in One SEO?

No. Multiple <script type="application/ld+json"> blocks per page are valid Schema.org and supported by Google — search engines merge the data. If both your SEO plugin and GEOforge emit schema, both will appear in the page head.

For SEO titles and meta descriptions, the plugin registers the Yoast, Rank Math, and The SEO Framework meta keys for REST so the active plugin renders GEOforge’s values instead of auto-generating its own. The registration calls are idempotent — if the SEO plugin has already registered the key itself, our call is a no-op. The auth callback restricts writes to users with edit_post capability on the target post. All in One SEO stores its data in a custom table rather than post meta, so it is not covered.

Why is the meta key prefixed with an underscore?

WordPress treats underscore-prefixed meta as “protected” — hidden from the default Custom Fields UI in the post editor. This prevents accidental editing of the JSON blob while still allowing the REST API (and this plugin) to read and write it.

What happens if I deactivate the plugin?

The stored schema data is preserved in post meta. Re-activating restores schema rendering on the front end. Uninstalling the plugin does not remove the meta.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“GEOforge Schema” is open source software. The following people have contributed to this plugin.

Contributors

Translate “GEOforge Schema” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.4.0

  • Register The SEO Framework’s _genesis_title and _genesis_description post-meta keys for REST write access, alongside the existing Yoast and Rank Math keys, so GEOforge can sync the SEO title and meta description to sites using The SEO Framework. Same idempotent registration and edit_post auth check as the other SEO keys.

1.3.0

  • Register the _geoforge_jsonld, _yoast_wpseo_metadesc, and rank_math_description meta keys for every public REST-enabled post type (previously posts and pages only), so GEOforge can publish into custom post types with full schema and meta-description delivery. Registration runs at init priority 20 so post types registered by themes/plugins at the default priority are included.
  • Enqueue the scoped .geoforge-content stylesheet on all singular views, not just posts and pages, matching the JSON-LD emitter.

1.2.0

  • JSON-LD output: decode the stored value and re-encode via wp_json_encode with JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT (plus JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) before emitting. Every HTML-sensitive character is emitted as a \uXXXX escape, replacing the prior str_replace('</', '<\/', $json) approach.
  • Register _yoast_wpseo_metadesc (Yoast SEO) and rank_math_description (Rank Math) post-meta keys for REST write access. Both use show_in_rest, an edit_post auth callback, and a sanitize_text_field-based sanitizer capped at 320 characters. Idempotent — no-op when the SEO plugin already exposes the key.

1.1.1

  • Readme: rewrite the short description so the wp.org renderer doesn’t strip the literal <head> tag and leave the sentence incomplete. Functionality unchanged.

1.1.0

  • Enqueue a small scoped stylesheet on single posts and pages that constrains .geoforge-content to a 768px max-width and makes inline images responsive. Fixes edge-to-edge text on themes that don’t apply a content container around the_content(). No typography or color rules — host theme keeps full control of look-and-feel.

1.0.0

  • Initial release.