PFT – Widget Spacing Control

PFT – Widget Spacing Control

توسط

PFT – Widget Spacing Control adds margin-top / margin-bottom inputs (desktop and mobile, separately) to every widget’s settings form. Negative values are supported, so you can both expand and tighten the space between widgets without adding empty spacer widgets.

Features

  • Per-widget top and bottom margin (px) for desktop and mobile
  • Negative values supported (e.g. -10 to tighten the gap)
  • Empty value falls back to the theme default
  • No settings page — inputs appear directly inside each widget’s form
  • Works with any theme (sidebar / widget area)
  • No external CSS file. No JavaScript. Single PHP file
  • No tracking. No external requests

How priority is guaranteed

To make sure your margin settings always win over theme and other plugin CSS:

  1. A triple-ID selector (#id#id#id) raises specificity to 0-3-0-0, beating typical theme selectors.
  2. !important is added on every declaration as a second line of defense.
  3. Styles are output via wp_footer at priority 9999, so they load after all other styles.

Media queries are used to switch between desktop and mobile values cleanly (inline styles are intentionally avoided because inline !important would override @media rules).

Responsive breakpoints

  • Desktop: 769px and above
  • Mobile: 768px and below

Privacy

This plugin does not collect, store, or transmit any personal data. It only stores numeric margin values inside each widget’s settings.

  1. Upload the widget-spacing-control folder to /wp-content/plugins/, or install via the Plugins screen in WordPress.
  2. Activate the plugin through the Plugins screen.
  3. Go to Appearance Widgets. Each widget now has a “余白設定 (Spacing)” section at the bottom of its form.
  4. Enter values (positive or negative integers) for PC and/or mobile, then save the widget.

سوالات متداول

Does it work with block-based widgets / Full Site Editing?

It targets the classic widget system that uses in_widget_form and dynamic_sidebar_params. Block widgets in FSE themes are not the target use case.

Will it conflict with my theme’s CSS?

No. The plugin uses inline styles, a high-specificity selector, and late-loaded <style> output, so it overrides theme CSS in all common cases.

Does it store any personal data?

No. The plugin only saves margin values (integers) in the widget instance options. No personal data is collected or transmitted.

Where are the settings saved?

Inside each widget’s instance settings (under WordPress’s standard widget_* options), with keys wsc_mt_pc, wsc_mt_sp, wsc_mb_pc, wsc_mb_sp.

تصویری برای این آیتم موجود نیست.
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها
هیچ نسخه‌ای برای این آیتم موجود نیست.
بدون امتیاز

قیمت:

رایگان

نگارش

آخرین انتشار

21 خرداد 1405

آخرین بروزرسانی

6 روز پیش

نصب های فعال

-

نگارش وردپرس

وردپرس 5.0+

تست شده از نسخه

وردپرس 7.0

نگارش PHP

PHP 7.4+

نسخه ها

0 نسخه