Make front-end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
Author: | Gary Jones (profile at wordpress.org) |
WordPress version required: | 4.6 |
WordPress version tested: | 4.9.1 |
Plugin version: | 3.2.1 |
Added to WordPress repository: | 24-05-2011 |
Last updated: | 30-11-2017
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 2 |
Plugin URI: | https://github.com/GaryJones/genesis-js-no-js |
Total downloads: | 10 054 |
Active installs: | 200+ |
Click to start download
|
FAQ
Installation Instructions
Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.
Upload
- Download the latest tagged archive (choose the “zip” option).
- Go to the Plugins -> Add New screen and click the Upload tab.
- Upload the zipped archive directly.
- Go to the Plugins screen and click Activate.
Manual
- Download the latest tagged archive (choose the “zip” option).
- Unzip the archive.
- Copy the folder to your
/wp-content/plugins/
directory.
- Go to the Plugins screen and click Activate.
Check out the Codex for more information about installing plugins manually.
Git
Using git, browse to your /wp-content/plugins/
directory and clone this repository:
git clone git@github.com:GaryJones/genesis-js-no-js.git
Then go to your Plugins screen and click Activate.
Composer
composer require gamajo/genesis-js-no-js
What does this plugin actually do?
If you look at the source of a WordPress back end page, you’ll see it has a body class of no-js
. Immediately after the opening body
tag is a small script which replaces no-js
with js
(you can see the amended class with browser developer tools).
WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.
This plugin recreates the same effect, but for the front end of Genesis Framework child themes.
Shouldn’t the script be at the end of the page?
Usually, yes, but it’s a fairly small script, so does not block rendering of other content for any noticeable length of time.
Doing it immediately also reduces a flash of incorrectly styled content, as the page does not load with no-js
styles, then switch to js
once everything has finished loading.
ChangeLog