=== Dynamics Sidebars === Contributors: alyssonweb Tags: sidebar, widget, dynamic, different Requires at least: 3.0 Tested up to: 3.2.1 Stable tag: 0.1.2 Add a custom field to add widget area for Pages. == Description == Add a custom options to Pages so Pages can display a different sidebars. **Please Note** * Requires at least: 3.0 * Tested up to: 3.2.1 **Install** 1. Unzip the dynamics-sidebars.zip file. 1. Upload the the dynamics-sidebars folder (not just the files in it!) to your wp-contents/plugins folder. If you're using FTP, use 'binary' mode. **Activate** 1. In your WordPress administration, go to the Plugins page 1. Activate the Dynamics Sidebars plugin. **Usage** 1. After activating the plugin 1. Go to the Pages > Add or New and you should see the Dynamic Sidebar Metabox on the side (if not showing up try active 'Dynamic Sidebar' under 'Screen Options' on 'Edit Page' page on the top-right handside and make sure 'Dynamic Sidebar' is ticked ) 1. Enter the name of your dynamic sidebar, recommend to put the same name as your page title 1. Go to the Appearance > Widget page and place anything on your new widget area 1. On either files page.php, sidebar.php, sidebar-{custom}.php or custom-template.php just add the following code: `ID, 'dynamic_sidebar', true ); // Display the sidebar area dynamic_sidebar( $dynamic_sidebar ); ?>` **Checking if sidebar is active** `ID, 'dynamic_sidebar', true ); if ( is_active_sidebar( $dynamic_sidebar ) ) { // Do your stuff } ?>` **Changing before_widget and after_widget** On your functions.php file just add the following code, don't forget to change 'function_to_return_my_new_*' to your own function `` ***Here is an example:*** `'; } function ds_after_widget(){ return ''; } ?>` == Installation == **Install** 1. Unzip the dynamics-sidebars.zip file. 1. Upload the the dynamics-sidebars folder (not just the files in it!) to your wp-contents/plugins folder. If you're using FTP, use 'binary' mode. **Activate** 1. In your WordPress administration, go to the Plugins page 1. Activate the Dynamics Sidebars plugin. **Usage** 1. After activating the plugin 1. Go to the Pages > Add or New and you should see the Dynamic Sidebar Metabox on the side (if not showing up try active 'Dynamic Sidebar' under 'Screen Options' on 'Edit Page' page on the top-right handside and make sure 'Dynamic Sidebar' is ticked ) 1. Enter the name of your dynamic sidebar, recommend to put the same name as your page title 1. Go to the Appearance > Widget page and place anything on your new widget area 1. On either files page.php, sidebar.php, sidebar-{custom}.php or custom-template.php just add the following code: `ID, 'dynamic_sidebar', true ); // Display the sidebar area dynamic_sidebar( $dynamic_sidebar ); ?>` **Checking if sidebar is active** `ID, 'dynamic_sidebar', true ); if ( is_active_sidebar( $dynamic_sidebar ) ) { // Do your stuff } ?>` **Changing before_widget and after_widget** On your functions.php file just add the following code, don't forget to change 'function_to_return_my_new_*' to your own function `` ***Here is an example:*** `'; } function ds_after_widget(){ return ''; } ?>` = 0.1 = * First version of the plugin. = 0.1.1 = * Changes to the readme.txt = 0.1.2 = * Added install and uninstall functions * Checked version 3.0 > 3.2.1 * Changes to 'readme.txt' * Requires at least: 3.0 * Tested up to: 3.2.1 == Upgrade Notice == = 0.1 = First version of the plugin. Stable version. = 0.1.1 = Minor changes and change to 'readme.txt' = 0.1.2 = Added install and uninstall functions and others minor changes