| 开发者 | volodymyrdev |
|---|---|
| 更新时间 | 2026年7月27日 03:00 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[visual_compare id="123"].[visual_compare before="123" after="456"].[visual_compare] shortcode in classic content, widgets, templates, and builders that render WordPress shortcodes.visual-compare folder to /wp-content/plugins/.[visual_compare id="123"].No. VisualCompare includes a native WordPress block, reusable comparison entries, and shortcode support. The Elementor widget is available only when Elementor is active.
Yes. Add the Visual Comparison block from the block inserter. The block supports inline comparisons and reusable Visual Comparison items.
This version includes dedicated support for the WordPress block editor and Elementor. Other builders can use the [visual_compare] shortcode where they support normal WordPress shortcode rendering.
VisualCompare is theme-independent and should work with themes that output normal WordPress content, widgets, shortcodes, and enqueued frontend assets. If a theme or builder disables WordPress shortcodes or strips plugin assets, use the native block or Elementor widget where available.
Create a reusable comparison under Visual Comparisons and copy its shortcode, for example:
[visual_compare id="123"]
You can also create an inline comparison with attachment IDs:
[visual_compare before="123" after="456" orientation="horizontal" start="50"]
Make sure both images are valid WordPress image attachments. If a reusable comparison is used, confirm that the comparison is published and that the shortcode ID matches the saved item.
Both images remain visible in a stacked layout. JavaScript progressively enhances the markup into an interactive comparison slider when it loads successfully.
VisualCompare includes keyboard interaction, range input semantics, screen-reader instructions, labels, unique instance IDs, and a no-JavaScript fallback. Site owners should still provide meaningful image alt text and review final page content for their own accessibility requirements.
The plugin registers its frontend assets but enqueues them only when a comparison is detected or rendered. Pages without comparisons should not load the VisualCompare frontend script or stylesheet.
Yes. Administrators can open Visual Comparisons > Settings and set defaults for orientation, starting position, interactions, aspect ratio, image fit, labels, divider style, handle size, and corner radius. Defaults apply to newly created comparisons and do not overwrite existing content.
No, saved data is preserved by default. Permanent cleanup must be explicitly enabled in Visual Comparisons > Settings before uninstalling the plugin.