Feeling charitable? Buy me a coffee!
Literal Barrage:elbee elgee: a free parent theme for wordpress
Momma Says Spock You OUT.
Elbee Elgee (LBLG) is a parent theme with multiple layouts, including 1, 2 and 3 column fluid and fixed size designs. Its original inspiration was the Layout Gala (the “LG” in “Elgee”), whose extensive use of negative margins and creative use of floats gave 40 total layouts using a single HTML structure. I have pared down the options a bit, as WordPress’ dynamic sidebars have negated the need for several of the “mirror image” designs originally provided by Layout Gala.
It supports most advanced WordPress features, such as Featured Images, widgetized sidebars, custom header images, and custom backgrounds. It also features templates for BuddyPress and a custom BuddyPress menu widget, allowing BP admins greater flexibility in choosing a site design.
It also separates layouts and styles into two separate folders,
styles/ and auto-loads theme options (by default) from
includes/parent-options.php. If a child theme is active, it will also attempt to auto-load options supplied in
[child theme]/includes/child-options.php and can supplement, replace, or entirely negate the parent theme’s options, allowing for greater child theme flexibility. (See documentation in
includes/parent-options.php for further details.)
Additional layouts and styles can be added by simply placing new .css files in the
styles/ subdirectories, respectively.
elbee-elgee/folder to your site’s
hg clone http://bitbucket.org/zamoose/elbee-elgee.
git clone git://github.com/zamoose/Elbee-Elgee.git elbee-elgee
svn co http://bitbucket.org/zamoose/elbee-elgee/trunk elbee-elgee
Elbee Elgee features four native sidebars/widget areas: Primary, Secondary, Bottom-Left and Bottom-Right. In most layouts, Primary will be placed either directly above (e.g. in 2 column layouts) or to the right of (in 1 or 3 column layouts) Secondary. Bottom-Left and Bottom-Right, as their names suggest, are located at the bottom of the design in the footer on the left and right, respectively.
Elbee Elgee supports one menu by default (“Front Page”). A second menu (“Elbee Elgee BuddyPress Menu”) is activated when an active BuddyPress installation is detected. This menu will be automatically populated with the most commonly-used BuddyPress links. You may alter it as you see fit or choose not to use it at all.
Based in part on code provided by the BuddyPress Template Pack plugin
Elbee Elgee supports use of the BuddyPress social media framework out of the box. Support for BP has gotten better with further testing from willing end-users. If you have a bug that you run into while using BuddyPress, please let me know so that I can correct it.
I have planned Elbee Elgee to be a flexible parent theme from the very early stages. One of the coolest features (in my opinion) is its ability to auto-load theme options from either the parent theme or child themes. This primarily takes place in
includes/functions/options.php and allows for an arbitrary number of theme options to be set and configured by end users.
This effectively creates a parent/child relationship for theme options. Child themes of Elbee Elgee can either default back to the options provided by the parent theme, they can extend said options, they can override them entirely, or they can disable all theme options.
Based on the bbp_twentyten parent theme provided as a part of the default bbPress plugin install
Elbee Elgee features support for the “plugin-ized” version 2.0 of bbPress (the WordPress-based forum solution). If an active bbPress installation is detected, Elbee Elgee will populate the theme admin page with bbPress-appropriate options.
The HTML markup, combined with different CSS layout files, offers Elbee Elgee around 30 possible layout configurations right out of the gate. You can choose between 1, 2 and 3 column layouts, each of which offers static width, percentage-based and fluid width variants.
As of version 1.0 of Elbee Elgee, selecting a layout can be a bit confusing. Essentially, the CSS layout files are named in the following format:
[number of columns]-[fixed/fluid/percentage-based]-[sidebar locations].css
So, for example,
1-column-fixed.css is a single column layout with fixed width (960px by default), while
3-columns-fluid-sb-fixed-both.css is a 3 column fluid width design with fixed size sidebars on either side of the content area.
In successive versions of the theme I hope to implement a graphical layout-picker in order to make the layout selection process a bit more user-friendly.
layoutgala.css, is included with Elbee Elgee but is not intended for “production” use. Instead, it is intended as a learning tool. Due to the large number of layout stylesheets, the exact proportions and placement of the various theme elements can be a bit confusing (I mean, could you tell the difference between
2-columns-sb-right-under-full.css just by looking at the name?). I have therefore included a styling scheme, based on the original Layout Gala markup, that nicely demonstrates the layout features.
Elbee Elgee has a few notable hooks, with many more planned. I welcome your suggestions.
lblg_title(): Outputs the blog title at the top of each page
lblg_menu(): Outputs the navigation menu
lblg_the_postimage(): Displays the Featured Image for posts, pages and custom post types that support it
lblg_sidebar_header(): Hooks into top of sidebar.php
lblg_sidebar_footer(): Hooks into bottom of sidebar.php
lblg_enqueue_styles(): Enqueues CSS styles for output by WordPress
lblg_credits(): Outputs the theme credit links in the footer
lblg_echo_copyright(): Outputs the site’s copyright statement in the footer
I have tried to hew as closely as possible to the recommended best-practices in the form of the WordPress Settings API. Elbee Elgee should leave a minimal database footprint (at the moment, it is two options, soon to be only a single option). By supporting the Settings API, Elbee Elgee can gain some manner of future-proofing and it obtains security features at a minimal cost.
I have switched my development workflow from Subversion to Mercurial (I spend a great deal of time on the train and Hg’s distributed nature is ideal for such disconnected development) and, as such, host my code at http://bitbucket.org/zamoose/elbee-elgee. Please submit feature requests and bug reports using the issue tracker available at BitBucket.
If you are interested in learning more about Mercurial, HG Init is an excellent starters’ resource (and it’s even pretty good for moderately-skilled Hg users, too!)
wp_enqueue_scripts()to enqueue/output CSS due to changes in WordPress 3.3 (see here for details).
wp_list_pages()output CSS corrected
#lb-content dl.gallery-itemwhich corrects wonky float behavior in inline galleries
wp_footer()call moved to right before </body>
$_SERVER['PHP_SELF']replaced with proper WordPress call
textareaoptions properly escaped before output by
add_editor_style()functionality for more WYSIWYG-ish TinyMCE/DFW goodness
bbp_twentyten(ref. rev. 3331)
wp_kses_post()when sanitizing form data.
$_SERVER['PHP_SELF']in forms is discouraged as it presents a security risk.
( ! isset( $content_width ) ) $content_width = '640';entered twice in
As noted in the introduction, Layout Gala was the original inspiration for the layouts
Chip Bennett’s Oenology
Twenty Ten, the default WordPress theme prior to version 3.2, was the inspiration for the default dynamic header support
BuddyPress Template Pack by Andy Peatling for a ton of the BuddyPress functionality and template work
StudioPress‘s Icon Set for Bloggers iconography (Unfortunately, my preferred Mini2 icons are CC-Share-Alike or somesuch and therefore not WordPress Theme Repository-compatible)
Literal Barrage is Stephen Fry proof thanks to caching by WP Super Cache