Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/wp-db.php on line 668

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/wp-db.php on line 668

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/wp-db.php on line 668

Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-theme.php on line 554

Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-theme.php on line 595

Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-theme.php on line 535

Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-theme.php on line 544

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/comment-template.php on line 1739

Deprecated: wp_getimagesize(): Implicitly marking parameter $image_info as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/media.php on line 5006

Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/rest-api/class-wp-rest-request.php on line 960

Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/rest-api/class-wp-rest-request.php on line 980

Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/rest-api/class-wp-rest-request.php on line 992

Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/rest-api/class-wp-rest-request.php on line 1003

Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 151

Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 175

Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 164

Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 186

Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 138

Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 75

Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 89

Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 110

Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 127

Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-list.php on line 199

Deprecated: quickdocs\Quickdocs_Menus::render_metabox_dropdown(): Implicitly marking parameter $selected as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/quickdocs/src/class-quickdocs-menus.php on line 154

Deprecated: YoastSEO_Vendor\GuzzleHttp\Promise\queue(): Implicitly marking parameter $assign as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php on line 22

Deprecated: YoastSEO_Vendor\GuzzleHttp\Promise\each(): Implicitly marking parameter $onFulfilled as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php on line 304

Deprecated: YoastSEO_Vendor\GuzzleHttp\Promise\each(): Implicitly marking parameter $onRejected as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php on line 304

Deprecated: YoastSEO_Vendor\GuzzleHttp\Promise\each_limit(): Implicitly marking parameter $onFulfilled as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php on line 323

Deprecated: YoastSEO_Vendor\GuzzleHttp\Promise\each_limit(): Implicitly marking parameter $onRejected as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php on line 323

Deprecated: YoastSEO_Vendor\GuzzleHttp\Promise\each_limit_all(): Implicitly marking parameter $onFulfilled as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/promises/src/functions.php on line 338

Deprecated: YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php on line 60

Deprecated: Creation of dynamic property Yoast\WP\SEO\Main::$helpers is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/lib/abstract-main.php on line 65

Deprecated: popbot\Popbot::__construct(): Implicitly marking parameter $blog_id as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-popbot.php on line 37

Deprecated: popbot\Popbot::create(): Optional parameter $title declared before required parameter $template is implicitly treated as a required parameter in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-popbot.php on line 559

Deprecated: Creation of dynamic property popbot\Admin_Page::$parent is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 19

Deprecated: Creation of dynamic property popbot\Admin_Page::$slug is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 24

Deprecated: Creation of dynamic property popbot\Admin_Page::$title is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 25

Deprecated: Creation of dynamic property popbot\Admin_Page::$hidden is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 26

Deprecated: Creation of dynamic property popbot\Admin_Page::$template is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 27

Deprecated: Creation of dynamic property popbot\Admin_Page::$capability is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 28

Deprecated: Creation of dynamic property popbot\Admin_Page::$icon is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 29

Deprecated: Creation of dynamic property popbot\Admin_Page::$redirect is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 30

Deprecated: Creation of dynamic property popbot\Admin_Page::$scripts is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 31

Deprecated: Creation of dynamic property popbot\Admin_Page::$styles is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 32

Deprecated: Creation of dynamic property popbot\Admin_Page::$parent is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 19

Deprecated: Creation of dynamic property popbot\Admin_Page::$slug is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 24

Deprecated: Creation of dynamic property popbot\Admin_Page::$title is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 25

Deprecated: Creation of dynamic property popbot\Admin_Page::$hidden is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 26

Deprecated: Creation of dynamic property popbot\Admin_Page::$template is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 27

Deprecated: Creation of dynamic property popbot\Admin_Page::$capability is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 28

Deprecated: Creation of dynamic property popbot\Admin_Page::$icon is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 29

Deprecated: Creation of dynamic property popbot\Admin_Page::$redirect is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 30

Deprecated: Creation of dynamic property popbot\Admin_Page::$scripts is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 31

Deprecated: Creation of dynamic property popbot\Admin_Page::$styles is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 32

Deprecated: Creation of dynamic property popbot\Admin_Page::$parent is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 19

Deprecated: Creation of dynamic property popbot\Admin_Page::$slug is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 24

Deprecated: Creation of dynamic property popbot\Admin_Page::$title is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 25

Deprecated: Creation of dynamic property popbot\Admin_Page::$hidden is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 26

Deprecated: Creation of dynamic property popbot\Admin_Page::$template is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 27

Deprecated: Creation of dynamic property popbot\Admin_Page::$capability is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 28

Deprecated: Creation of dynamic property popbot\Admin_Page::$icon is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 29

Deprecated: Creation of dynamic property popbot\Admin_Page::$redirect is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 30

Deprecated: Creation of dynamic property popbot\Admin_Page::$scripts is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 31

Deprecated: Creation of dynamic property popbot\Admin_Page::$styles is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 32

Deprecated: Creation of dynamic property popbot\Admin_Page::$parent is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 19

Deprecated: Creation of dynamic property popbot\Admin_Page::$slug is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 24

Deprecated: Creation of dynamic property popbot\Admin_Page::$title is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 25

Deprecated: Creation of dynamic property popbot\Admin_Page::$hidden is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 26

Deprecated: Creation of dynamic property popbot\Admin_Page::$template is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 27

Deprecated: Creation of dynamic property popbot\Admin_Page::$capability is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 28

Deprecated: Creation of dynamic property popbot\Admin_Page::$icon is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 29

Deprecated: Creation of dynamic property popbot\Admin_Page::$redirect is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 30

Deprecated: Creation of dynamic property popbot\Admin_Page::$scripts is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 31

Deprecated: Creation of dynamic property popbot\Admin_Page::$styles is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 32

Deprecated: Creation of dynamic property popbot\Admin_Page::$parent is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 19

Deprecated: Creation of dynamic property popbot\Admin_Page::$slug is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 24

Deprecated: Creation of dynamic property popbot\Admin_Page::$title is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 25

Deprecated: Creation of dynamic property popbot\Admin_Page::$hidden is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 26

Deprecated: Creation of dynamic property popbot\Admin_Page::$template is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 27

Deprecated: Creation of dynamic property popbot\Admin_Page::$capability is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 28

Deprecated: Creation of dynamic property popbot\Admin_Page::$icon is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 29

Deprecated: Creation of dynamic property popbot\Admin_Page::$redirect is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 30

Deprecated: Creation of dynamic property popbot\Admin_Page::$scripts is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 31

Deprecated: Creation of dynamic property popbot\Admin_Page::$styles is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/popbot/src/class-admin-page.php on line 32

Deprecated: WPSEO_Admin_Asset_Manager::__construct(): Implicitly marking parameter $asset_location as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php on line 43

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated since 8.1, use htmlspecialchars() instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated since 8.1, use htmlspecialchars() instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28

Deprecated: WPSEO_Admin_Bar_Menu::__construct(): Implicitly marking parameter $asset_manager as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php on line 62

Deprecated: Calling get_class() without arguments is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-http.php on line 328

Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Cookie/Jar.php on line 63

Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Cookie/Jar.php on line 73

Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Cookie/Jar.php on line 89

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-term.php on line 198
Letting Users Customise CSS Styles in your WordPress Theme using a Settings Page

Letting Users Customise CSS Styles in your WordPress Theme using a Settings Page


Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/vhosts/wrd.studio/httpdocs/blog/wp-includes/class-wp-block-type-registry.php on line 152

Creating a WordPress theme can be a simple process. WordPress only needs a couple of files to understand and render your theme without any issues. But as your theme grows larger and more complex, you may need to allow users to customise aspects of it that are difficult to implement using WordPress’ core Customizer API. Font choices, rich colour schemes, shadows and border rounding are all things you may need a bit more control over than you’ll find in the default tooling, which is why many themes choose to add their own Theme Settings page so that admins can bring their own branding to a site. This article will walk through how I manage users customising core styling choices.

The Plan

We’re going to be creating a custom admin page to let users make styling choices. When they submit the form with all those options, we’ll programmatically generate a CSS stylesheet to reflect those choices. That stylesheet is enqueued on every page after our base styles and resets so that it’ll override them.

Caveats & Planning Ahead

On top of our existing theme stylesheet/s, we’re going to be enqueuing a CSS stylesheet that’s unique to each website. Overriding hundreds of rules from the original stylesheet is going to not only increase our file sizes but it’s going to make our code incredibly hard to maintain as we continue development. Luckily, CSS has a perfect solution for this:

Custom Properties, also known as CSS Variables mean we can define some default options for our styles and then override them later. We can have a CSS variable for our heading and body fonts, colour palette, shadow styles and many more. We can even have a single middle value for border radius and then use calc() to add our larger and smaller sizes. Then we can create presets for none, small, medium and large border-radius styles by setting only a single value.

So, in our base file we’ll have some CSS like this:

:root{
    --color-secondary-50: 245 250 255;
    --color-secondary-100: 187 223 255;
    --color-secondary-300: 116 190 255;
    --color-secondary-500: 30 146 248;
    --color-secondary-700: 0 97 183;
    --color-secondary-900: 13 36 70;

    --color-primary-50: 247 249 237;
    --color-primary-100: 231 237 204;
    --color-primary-300: 196 214 115;
    --color-primary-500: 133 167 0;
    --color-primary-700: 92 114 3;
    --color-primary-900: 18 68 0;

    --color-black-100: 255 255 255;
    --color-black-200: 247 252 255;
    --color-black-300: 228 235 239;
    --color-black-400: 204 216 223;
    --color-black-500: 173 186 194;
    --color-black-600: 126 142 151;
    --color-black-700: 88 108 119;
    --color-black-800: 53 73 85;
    --color-black-900: 14 37 51;

    --font-heading: Roboto Slab, 'Roboto Slab';
    --font-body: Muli, 'Muli';

    --border-r: 0.2rem;
    
    --border-r-sm: calc(var(--border-r) * 0.6); /* 0.12rem */
    --border-r-md: calc(var(--border-r) * 1.9); /* 0.38rem */
    --border-r-lg: calc(var(--border-r) * 2.5); /* 0.5rem */

}

And then we can simply override that with our user’s custom styles by declaring the property. You can extend this a lot further to use CSS variables for things like heading styles but in this instance, I’m just writing new selectors.

Reading and writing files in PHP is always something that makes me slightly uncomfortable. There are a lot of things that can go wrong with permissions and managing file paths. An alternative to this might be to inline all our custom styles in the header of every page. However, this will eliminate the browser’s ability to cache our stylesheet which will increase our page load by a tiny amount for returning visitors. It’ll also increase the amount of work our server has to do on every page load. By creating a CSS file, we can make it so the server only does that work whenever the options are updated. I haven’t used the WordPress Filesystem API for this article but I would highly recommend it as it’ll handle many of the permissions and host issues for us.

Creating an Admin Page

I’ve already detailed how I create admin pages in WordPress using wrapper classes to contain all the functionality and remove the boilerplate. Take a look at that article to learn more, but we’re basically just using the built-in add_menu_page function. Setting up menu pages in WordPress is pretty painless but these classes let us do it with less code.

Checking if a WordPress Admin Page has been Submitted

Now that we’ve added our admin page, we can set up a function to check whenever our options are updated. I wasn’t able to find a great hook for this, so I’m simply firing this function on every admin_init call and checking if the options are in the $_POST variable and we’re updating the correct page, like so:

function wrds_on_theme_styling_save()
{
    if (
        !(array_key_exists('option_page', $_REQUEST) &&
            $_REQUEST['option_page'] == "our_custom_styling_page" &&
            !empty($_POST))
    ) {
        return false;
    }

    ob_start();

    // Generate out stylesheet, grabbing the values with get_option.
    // Example:
    // echo ":root{\n";
    // echo "--border-r:" . get_option("wrds_border_r", "0.2rem") . "\n";
    // echo "}\n";


    $custom_css_content = ob_get_clean();
    file_put_contents($my_filepath, $custom_css_content);
}
add_action('admin_init', 'wrds_on_theme_styling_save', 999, 0);

I’m using output buffering here so I can simply echo out all my styling rules rather than appending them to a string, I find that is just easier to manage.

Conclusion

Depending on your use cases you can get a lot fancier than the example I showed above. You could use a colour mixing library to generate shades from a single base colour. You might need to programmatically generate a Google Fonts URL. The benefits of this system are you get to run it once and you can be as complex as you need to be and if you set up your styles with CSS Variables from the start then you get a lot of powerful flexibility and expandability.