| 开发者 | yujesh |
|---|---|
| 更新时间 | 2026年11月5日 23:51 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
post_content, which keeps your database clean.
Who Is MetricPage Builder For?
Developers and agencies: Keep full control over markup, CSS and the design system on every client site. You define the components and the builder becomes a structured, lightweight editing screen.
Clients and content editors: A simple editing experience with no margin, padding or styling controls to learn. Fill in the fields, click Publish and the page matches the approved design.
Performance-focused site owners: If you care about Core Web Vitals, page speed scores and a lean database, MetricPage Builder keeps your front end light.
metricpage-builder folder to the /wp-content/plugins/ directory, or install it from Plugins → Add New Plugin by searching for "MetricPage Builder".Yes. Go to Metric → Theme Parts, add a header or footer and build it in the same builder as your pages. You can create as many as you like and choose where each appears with display conditions: entire site, front page, blog page, search, 404, author/date archives, all singular content, a post type (all or specific items), all archives, a post type archive, or a taxonomy (all or specific terms). Exclude rules win; otherwise the most specific match wins, and ties go to the most recently updated part. Pages with no match keep your theme's default.
Your theme needs to print the part where it outputs its header or footer:
<?php if ( ! function_exists( 'metric_builder_part' ) || ! metric_builder_part( 'header' ) ) { get_template_part( 'header-default' ); } ?>
Themes can declare add_theme_support( 'metric-site-parts' ); and seed their own header/footer components with the metric_site_part_seed filter.
Yes, for the common ones. When you save settings or clear the Metric cache, MetricPage Builder also purges LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, WP Fastest Cache and SiteGround Optimizer if they are installed, so changes such as verification tags show up right away. Hosts and CDNs can hook the metric_purge_page_caches action to purge their own cache.
Site basics sets the title separator and the Website name used in page titles (once you have saved Site basics). When schema is switched on (Schema tab), Representation and Site basics fill the Organization or Person schema, and the front page also gets a WebSite node. The home page and every single page or post get Open Graph and X social cards, using the page's SEO description and featured image, or the fallback site image. Brand & Design prints its colors, sizes and font as --metric-* CSS variables for your theme. Branding & Header supplies the favicon when the site has no WordPress site icon.
No. When one of them is active, MetricPage Builder leaves titles and social cards to it, and the schema follows the "switch off automatically" option on the Schema tab. The social cards also stay off when All in One SEO, The SEO Framework, Slim SEO or Squirrly SEO is active, and where MetricPage Builder prints its cards it switches Jetpack's Open Graph tags off, so a page never gets two sets. Developers can also turn the social cards off with the metric_social_cards_enabled filter.
Social cards appear on the home page and on single pages; the Brand & Design values print as --metric-* CSS variables; a favicon saved under Branding & Header prints when the site has no WordPress site icon; the built-in header shows the Branding & Header logo when its own logo field is empty; and, with schema on, the home page schema also gets a WebSite node (the Organization details stay the same). Titles and "Limit advanced options to editors" only start once you save the Site basics panel; saving another tab does not switch them on.
After you save Site basics with this option on, only users who can edit other people's posts (editors and administrators) can change a page's canonical URL, noindex setting or page schema. For other users the builder hides those tabs, and the server keeps the stored values when they save or publish.
Yes, MetricPage Builder acts as a complete alternative to the default editor on the pages you choose to edit with it.
The raw schema data is stored efficiently in post meta. The compiled SSR output is held in a regenerable cache (object cache, transient, or a file under uploads/metricpage-builder/) and injected into the page through a the_content filter, so your site stays fast.
Note: the compiled HTML is not written back into the post_content column. Plugins that analyse the raw column directly (for example some SEO content analysers) will not see the rendered body.
--metric-* CSS variables; Branding & Header supplies the favicon (when the site has no site icon) and the header logo fallback.metric_social_cards_enabled and metric_social_cards; metric_schema_website adjusts the WebSite node.metric_logo_url(), metric_favicon_url(), metric_header_menu_id(), metric_header_cta() and metric_site_info().$f), with schema defaults filled in automatically. Function-style components keep working.metric_template_fields() and metric_render_template()..metric-single and centered .metric-single-image with clean responsive max-width containment.PostBlocks.php when image shape or content width attributes are omitted.metric_register_dynamic_block() registers blocks rendered on every request; select fields accept enumLabels.metric_front_allowed_html filter.metric_supported_post_types).<style> blocks shipped by theme-kit components were being stripped down to their bare CSS text and printed visibly on the page; also fixes any --custom-property inside them being corrupted into – characters.