[Plugin: NextGEN Gallery] tag cloud in sidebar used as navigation
-
Here is a solution to the problem of how to get a tag cloud listed in your sidebar to act as navigation.
So you want a tag cloud to appear in the side bar, and when you click on a tag the corresponding pictures to appear in the main page area?
here is how I did it (amended from zyrq updated for wordpress 3.0 and nextgen 1.5.5 – it may work with earlier versions of both):
1. create a page called ‘gallery’ and add this code (use the html not the visual editor) ‘[tagcloud]’
2. download this plugin “Samsarin PHP Widget” and install it.
3. paste this code into the new “Samsarian PHP 1” widget created:
<ul class="galtags"> <?php global $wpdb; $results = $wpdb->get_results('SELECT * FROM wp_terms INNER JOIN wp_term_taxonomy ON wp_terms.term_id = wp_term_taxonomy.term_taxonomy_id WHERE taxonomy = "ngg_tag"'); foreach ($results as $row) { echo "<li><a href=https://www.example.com/gallery/?gallerytag="; echo $row->slug; echo ">"; echo $row->name; echo "</a> </li> "; } ?> </ul>
4. change https://www.example.com to the name of your website URL.
5. Thats it.
For some reason every other attempt on the web to solve this problem does not work so after I got it working I thought I’d share this to help others who may have got stuck
Michael
- The topic ‘[Plugin: NextGEN Gallery] tag cloud in sidebar used as navigation’ is closed to new replies.