Plugin info

Total downloads: 1,761
Active installs: 0
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 9/22/2012 (4848 days ago)
Added to WordPress: 11/24/2011 (14 years old)
Minimum WordPress version: 3.2.0
Tested up to WordPress version: 3.4.2
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 4848 days ago

20/100

Is WP Autoload abandoned?

Possibly abandoned (last update 4848 days ago).

Compatibility

Requires WordPress: 3.2.0
Tested up to: 3.4.2
Requires PHP: f

Languages

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Cairn
Rating 0.0/5 (0 reviews)Active installs 0
Starter Templates – AI-Powered Templates for Elementor & Gutenberg
Rating 4.9/5 (4,706 reviews)Active installs 2,000,000
Redux Framework
Rating 4.4/5 (272 reviews)Active installs 1,000,000
Envato Elements – Photos & Elementor Templates
Rating 3.8/5 (65 reviews)Active installs 1,000,000
Premium Addons for Elementor – Powerful Elementor Templates & Widgets
Rating 4.9/5 (1,653 reviews)Active installs 700,000
Extendify
Rating 4.7/5 (10 reviews)Active installs 500,000

Description

Most themes have a single stylesheet, a few JavaScript files, and all the PHP in functions.php. WP Autoload makes it trivial for theme developers to split up CSS, JS, and PHP per template, simplifying development and maintenance. It also makes it much easier to write per-template unit tests.

Installation

  1. Upload the plugin to your plugins directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Check the settings on the configuration page (Settings -> WP Autoload)

Frequently Asked Questions

How do I use this in my theme?

WP Autoload looks for files in the same way WordPress looks for templates, but it also loads ‘parent’ files. Say your theme looks like this:

themes/   foobar/     css/       archive.css       page.css       page-bar.css     inc/       page.php       page-bar.php     js/       archive.js       page.js       page-bar.js 

For an archive page, WP Autoload will load:

  • css/archive.css
  • js/archive.js

No surprises there.

For a normal page, WP Autoload will load:

  • css/page.css
  • inc/page.php
  • js/page.js

WP Autoload will then try to create a new WP_Autoload_page object. The class must extend WP_Autoload_Template, e.g.:

class WP_Autoload_page extends WP_Autoload_Template {   ... } 

For a page with a slug of bar, WP Autoload will load:

  • page.css and page-bar.css, with page.css as a dependency of page-bar.css
  • page.php and page-bar.php, in that order
  • page.js and page-bar.js, with page.js as a dependency of page-bar.js

WP Autoload will then try to create a new WP_Autoload_page_bar object; because page.php is loaded first you can do this:

class WP_Autoload_page_bar extends WP_Autoload_page {   ... } 

What about performance?

For templates where there is no specific stylesheet or script file the performance implications of WP Autoload are negligible. For templates with both a specific stylesheet and script file WP Autoload will add two requests to the overall page load sequence. Typically these extra requests have no significant impact on page load time because they are offset by the reduced size of the common stylesheet.

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

2.5.0

  • Support for hierarchical post types.

2.1.3

  • Bugfix: fix debug warning with E_ALL.

2.1.2

  • Bugfix: fix loading base classes.

2.1.1

  • Bugfix: remove debug code.

2.1.0

  • Support for child themes.

2.0.0

  • Per-template classes.
  • Better sidebar handling.

1.1.1

  • Dependencies configuration bug fix.

1.1.0

  • Improved template part list filtering.

1.0.4

  • Add enqueue_script() method to allow scripts to be enqueued after wp_head().

1.0.3

  • Tag fix.

1.0.2

  • Handle single dependencies better.

1.0.1

  • Fix minor PHP warning.

1.0

  • Initial release.