A guide to Sliding Panel

The Sliding Panel plugin adds a panel that opens and closes to the top of your WordPress-powered blog. If you're in need of an area to house more content yet not get in the way, this is the ideal plugin.

The plugin is built off the wonderful jQuery library and is fully widgetized, so you can add any content you want. If you want a login form. Add it. If you want welcome text. No problem. Category list? You're covered.

How to install the plugin

  1. Unzip the sliding-panel.zip folder.
  2. Upload the sliding-panel folder to your /wp-content/plugins directory.
  3. In your WordPress dashboard, head over to the Plugins section.
  4. Activate Sliding Panel.

How to use the plugin

Once you've activated the plugin, go to the Widgets control panel and find the Sliding Panel widget area. Add widgets to that widget area.

If you're using the Hybrid, Thematic, or Prodigy WordPress theme, the plugin will auto-insert itself at the top of the page.

If you're not using one of the mentioned themes, you'll need to add this code after the opening <body> tag in your header.php file:

<?php if ( function_exists( 'get_sliding_panel' ) ) get_sliding_panel(); ?>

Custom Style

Since black and gray is probably not the color of most WordPress themes, it's likely you'll want to create your own style for your sliding panel. To do this, you'll want to first remove the stylesheet added by the plugin.

Add this to PHP code your theme's functions.php file.

add_action( 'template_redirect', 'remove_panel_styles', 11 );

function remove_panel_styles() {
	wp_deregister_style( 'sliding-panel' );
}

Once that's done, you're free to style the panel as you wish. I'd recommend copying the plugin's panel.css file into the bottom of your theme's style.css file and working from there.

Disable the auto-insertion

If you're using one of the themes that auto-inserts the sliding panel and would like to disable this behavior, add this PHP code to your theme's functions.php file:

add_action( 'template_redirect', 'remove_sliding_panel' );

function remove_sliding_panel() {
	/* Use with the Hybrid theme. */
	remove_action( 'hybrid_before_html', 'get_sliding_panel' );

	/* Use with the Thematic theme. */
	remove_action( 'thematic_before', 'get_sliding_panel' );

	/* Use with the Prodigy theme. */
	remove_action( 'prodigy_before', 'get_sliding_panel' );
}

Plugin support

I run a WordPress community called Theme Hybrid, which is where I fully support all of my WordPress projects, including plugins. You can sign up for an account to get plugin support for a small yearly fee ($25 USD at the time of writing).

I know. I know. You might not want to pay for support, but just consider it a donation to the project. To continue making cool, GPL-licensed plugins and having the time to support them, I must pay the bills.

Copyright & license

Sliding Panel is licensed under the GNU General Public License, version 2 (GPL).

This plugin is copyrighted to Justin Tadlock. The original idea for this plugin came from the Web Kreation tutorial on creating a sliding panel in WordPress.

2009 © Justin Tadlock