This Page Relates to WPG2 Version 3.0
From Wordpress 2.2 onwards you can add your Gallery2 Content to your Wordpress sidebar from three included WPG2 widgets (Sidebar Album Tree, Sidebar Block, Sidebar Grid) via your Wordpress Widgets SubPanel. However, if your Wordpress theme is not widget-aware, you can still ad the functions of the widget to your sidebar by instead manually adding the function calls to your sidebar by following the installation instructions below.
Please Note: You must FIRST configure the various sidebar output options from WPG2 Options Sidebar Block and WPG2 Options Sidebar Grid.
If you are unsure how to edit your sidebar, check out the wordpress lesson on editing the sidebar Here.
Manual Album Tree Installation
- To have a clickable list of your Gallery2 Albums, listed as a (Collapsible, Sorted) Tree add the following code:
<?php print wpg2_make_html_album_tree()?>
- You can also override the settings and freely define your own block settings by using the following code
<?php print g2_sidebargridblock(blocktype, number_of_images, blockmaximgsize, blocktitle); ?>
- Where blocktype valid values limited to the following..
- 'randomImage'
- 'recentImage'
- 'randomAlbum'
- 'recentAlbum'
- Where number_of_images is an integer that defines the number of images that will be included in this particular image gridblock.
- Where blockmaximgsize is an integer that defines the maximum number of pixels that a thumbnail will occupy in either width or height. This can be larger than the pixel size of your Gallery2 thumbnails, but it will not increase the size of the thumbnail in this case.
- Where blocktitle is the title that you want shown as a <h2> heading in the image gridblock.
- If you want to display a specific image in the block, add the following code:
<?php print g2_sidebarimageblock(id); ?>
- Where id is an integer representing the Gallery2 entity ID of the image or album you desire to display. If you choose an album, the highlight image for that album will be displayed.