wfx_get_sidebar

Description

A direct replacement for the WordPress get_sidebar() function. Includes the get_sidebar() function, but extends functionality to include core Wonderflux functionality to conditionally show or hide the sidebar (controllable through the wflux_sidebar_1_display filter).

Parameters

Single parameter to include a named sidebar – like get_template_part() or wfx_get_template_part(). For instance sidebar-alternative.php file would be included if you used wfx_get_sidebar('alternative') in your theme code.

Return values

None – includes the sidebar theme file.

Example

<?php
//Example 1
//In any of your core theme files, for example page.php:
wfx_get_sidebar('');
// Would include sidebar.php
//Example 2
//In any of your core theme files, for example page.php:
wfx_get_sidebar('alternative');
// Would include sidebar-alternative.php
?>

Notes

You can just use the WordPress get_sidebar() function instead if you wish, but you will miss-out on some of the cool stuff Wonderflux can do!

This function documentation was last modified on: September 20, 2011 by Jonny