Title: [Plugin: CataBlog] theme and cloud widget integration?
Last modified: August 20, 2016

---

# [Plugin: CataBlog] theme and cloud widget integration?

 *  Resolved [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/)
 * Hello again, Zach!
 * After a rather bumpy road while testing/debugging/fixing some other tag/gallery
   plugins, I’m back again to give CataBlog a serious drive for my project. May 
   I say the admin part for uploading and categorizing images so far has been state-
   of-the-art. Kudos!
 * Now, I have a clear set of goals I had achieved with other plugins and now need
   somehow replicate with CataBlog. Namely:
 * – Theme integration. Need archive.php to show a gallery depending of the category
   tag slug. I see there’s a catablog_show_items() that seems adequate for the job,
   but do you have a head-start example showing the returned object, etc. and how
   to loop it to get the images out?
 * – Need a (multi-taxonomy) cloud tag widget to show the catablog categories. Supposedly
   the new catablog’s taxonomy ‘catablog-terms’ would do it or there’s another way/
   widget?
 * Thanks very much in advance.
    Alex
 * [http://wordpress.org/extend/plugins/catablog/](http://wordpress.org/extend/plugins/catablog/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2204839)
 * Okay, lets start answering my own questions.
 * 2) The following excellent tag cloud widget seems to work with CataBlog too: [
   nktagcloud: Better Tag Cloud]. Just need to put [catablog-terms] as the taxonomy
   and it starts showing stuff from the categories. Great!
 * Now need to figure our how to loop the catablog class to get the images out for
   the slug:
    ?catablog-terms=catablog-term-<category>
 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2204951)
 * After some digging found the key piece and for the first question:
 *     ```
       $cb_category = $wp_query->get_queried_object()->name;
       catablog_show_items($cb_category, 'gallery');
       ```
   
 * What I can see for now is that instead of making my own design and loop the dataset
   into taxonomy-catablog-terms.php, instead should create a CataBlog template and
   refer it as the second parameter. Cool.
 * Interestingly, it seems catablog does not offer its way to get the current catalog
   name/slug. The above was the WP way.
 *  Plugin Author [macguru2000](https://wordpress.org/support/users/macguru2000/)
 * (@macguru2000)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2204964)
 * alx359,
 * You may also experiment with the Public feature, which will let you loop through
   your catalog categories with the WP loop, in fact it is exactly like making an
   archive.php file in your theme. Just name the file in your theme `taxonomy-catablog-
   terms.php`.
 * Also read more at [Update Introduces Individual Catalog Item Pages](http://catablog.illproductions.com/2011/05/new-individual-catalog-item-pages/)
 * Good luck, and thanks for the tag cloud solution, didn’t know about that one 
   😉
 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2204968)
 * Thanks Zachs, will do. Currently I’m happy enough that with your plugin one can
   implement a dynamic theme gallery with just the 2 lines of code above. Fantastic!
 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2205007)
 * Just for reference. That’s the straightforward content of my `taxonomy-catablog-
   terms.php` to create a dynamic gallery for any slug category.
 *     ```
       <?php get_header(); ?>
   
       <div id="content-area" class="clearfix">
       	<div id="left-area">
       		<?php
       		//get current category name from the slug
       		$cb_category = $wp_query->get_queried_object()->name;
       		$cb_template = "gallery";
       		$cb_sort     = 'date'; //title, date, order or random
       		$cb_order    = 'asc'   //asc, desc
       		$cb_operator = 'IN';   //IN, NOT IN, AND. Default=IN
   
       		//populate current category from a given template
       		catablog_show_items($cb_category, $cb_template, $cb_sort, $cb_order, $cb_operator);
       		?>
       	</div> 	<!-- end #left-area -->
       	<?php get_sidebar(); ?>
       </div> <!-- end #content-area -->
   
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2205020)
 * Interesting. Just noted the code above is returning up to five images and there’s
   lot more. Shall debug tomorrow. Too late here.
 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2205030)
 * The issue was with my theme (ElegantThemes). They hook to `pre_get_posts` and
   set `posts_per_page` as per their ePanel `Number of Posts displayed on Archive
   pages` option. The easier fix was just put `-1` in there.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: CataBlog] theme and cloud widget integration?’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/catablog_f7f6f7.svg)
 * [CataBlog](https://wordpress.org/plugins/catablog/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/catablog/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/catablog/)
 * [Active Topics](https://wordpress.org/support/plugin/catablog/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/catablog/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/catablog/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [alx359](https://wordpress.org/support/users/alx359/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-catablog-theme-and-cloud-widget-integration/#post-2205030)
 * Status: resolved