ralfhortt/wp-content-width

Setting the global WordPress variable `$content_width` in a single place for php and css

Installs: 1 941

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ralfhortt/wp-content-width

1.4 2020-01-16 13:36 UTC

This package is auto-updated.

Last update: 2025-10-17 02:08:13 UTC


README

Setting the global WordPress variable $content_width in a single place for php and css

Installation

$ composer require ralfhortt/wp-content-width

Usage

<?php
use RalfHortt\ContentWidth\ContentWidth;

(new ContentWidth(980))->register();
.container {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--content-width);
	width: 100%;
}