function ss_menu_widget($args, $widget_args = 1) { extract($args, EXTR_SKIP); if (is_numeric($widget_args)) { $widget_args = array('number' => $widget_args); } $widget_args = wp_parse_args($widget_args, array('number' => -1)); extract($widget_args, EXTR_SKIP); $options = get_option('ssMenu_widget_options'); if (!isset($options[$number])) { return; } $title = $options[$number]['title'] != "" ? $options[$number]['title'] : ""; if (!empty($title)) { echo $before_widget . $before_title . $title . $after_title; } if (method_exists('ssMenu', 'foldcats')) { ssMenu::$add_ssmenu_script = true; //switch on js loader ssMenu::foldcats($number); } else { echo "<ul>\n"; wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); echo "</ul>\n"; } echo $after_widget; }
function b_wp_categories_show($options, $wp_num = "") { $block_style = $options[0] ? $options[0] : 0; $with_count = $options[1] ? $options[1] : 0; $sorting_key = $options[2] ? $options[2] : 'name'; $sorting_order = $options[3] ? $options[3] : 'asc'; global $wpdb, $siteurl, $wp_id, $wp_inblock, $user_cache, $cache_categories, $category_name, $cat; $id = 1; $use_cache = 1; if ($wp_num == "") { $wp_id = $wp_num; $wp_inblock = 1; require dirname(__FILE__) . '/../wp-config.php'; $wp_inblock = 0; } $cur_PATH = $_SERVER['SCRIPT_FILENAME']; if (preg_match("/^" . preg_quote(XOOPS_ROOT_PATH . "/modules/wordpress" . $wp_num . "/", "/") . "/i", $cur_PATH)) { $cat = array_key_exists('cat', $_GET) ? intval($_GET['cat']) : null; $category_name = array_key_exists('category_name', $_GET) ? $_GET['category_name'] : ''; if ($category_name and $cat == 0) { $category_name = preg_replace('|/+$|', '', $category_name); $cat = $wpdb->get_var("SELECT cat_ID FROM {$wpdb->categories[$wp_id]} WHERE category_nicename='{$category_name}'"); } } if ($block_style == 0) { // Simple Listing ob_start(); block_style_get($wp_num); echo "<ul class='wpBlockList'>\n"; wp_list_cats("sort_column={$sorting_key}&sorting_order={$sorting_order}&optioncount={$with_count}"); echo "</ul>\n"; $block['content'] = ob_get_contents(); ob_end_clean(); } else { // Dropdown Listing $file = "{$siteurl}/index.php"; $link = $file . '?cat='; ob_start(); block_style_get($wp_num); echo '<form name="listcatform' . $wp_num . '" action="">'; $select_str = '<select name="cat" onchange="window.location = (\'' . $link . '\'+document.forms.listcatform' . $wp_num . '.cat[document.forms.listcatform' . $wp_num . '.cat.selectedIndex].value);"> '; dropdown_cats(1, _WP_LIST_CAT_ALL, $sorting_key, $sorting_order, 0, $with_count); echo '</form>'; $block_str = ob_get_contents(); ob_end_clean(); $block['content'] = ereg_replace('\\<select name\\=[^\\>]*\\>', $select_str, $block_str); } return $block; }
function widget_blix_categories() { ?> <h2><em><?php _e('Categories'); ?> </em></h2> <ul class="categories"> <?php wp_list_cats('sort_column=name'); ?> </ul> <?php }
function category_block($options) { $mydirname = empty($options[0]) ? 'xpress' : $options[0]; $this_template = empty($options[1]) ? 'db:' . $mydirname . '_block_category.html' : trim($options[1]); $show_option_all = empty($options[2]) ? '' : $options[2]; $orderby = empty($options[3]) ? 'name' : $options[3]; $order = empty($options[4]) ? 'ASC' : $options[4]; $show_last_updated = empty($options[5]) ? false : true; $show_count = empty($options[6]) ? false : true; $hide_empty = empty($options[7]) ? false : true; $use_desc_for_title = empty($options[8]) ? false : true; $exclude = empty($options[9]) ? '' : $options[9]; $includes = empty($options[10]) ? '' : $options[10]; $hierarchical = empty($options[11]) ? false : true; $depth = !is_numeric($options[12]) ? 0 : $options[12]; if (function_exists('wp_list_categories')) { $param = array('show_option_all' => $show_option_all, 'orderby' => $orderby, 'order' => $order, 'show_last_update' => $show_last_updated, 'style' => 'list', 'show_count' => $show_count, 'hide_empty' => $hide_empty, 'use_desc_for_title' => $use_desc_for_title, 'child_of' => 0, 'feed' => '', 'feed_image' => '', 'exclude' => $exclude, 'include' => $includes, 'hierarchical' => $hierarchical, 'title_li' => '', 'number' => '', 'echo' => 0, 'depth' => $depth); if (xpress_is_wp_version('>=', '2.3')) { $block['categories'] = wp_list_categories($param); } else { // not suport echo flag ob_start(); wp_list_categories($param); $block['categories'] = ob_get_contents(); ob_end_clean(); } } else { if (empty($show_option_all)) { $optionall = 0; } else { $optionall = 1; } $param = array('optionall' => $optionall, 'all' => $show_option_all, 'sort_column' => $orderby, 'sort_order' => $order, 'show_last_update' => $show_last_updated, 'optioncount' => $show_count, 'hide_empty' => $hide_empty, 'use_desc_for_title' => $use_desc_for_title, 'child_of' => 0, 'feed' => '', 'feed_image' => '', 'exclude' => $exclude, 'hierarchical' => $hierarchical, 'recurse' => 1); ob_start(); wp_list_cats($param); $block['categories'] = ob_get_contents(); ob_end_clean(); } return $block; }
bloginfo('template_directory'); ?> /img/stl.gif" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <!-- POSTS BY CATEGORY --> <h2><?php _e('Categories'); ?> </h2> <ul> <?php wp_list_cats(); ?> </ul> <div class="sideitembottom"> <img src="<?php bloginfo('template_directory'); ?> /img/sbl.gif" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div><!-- end sideitem -->
* @subpackage Grid_Focus */ ?> <div class="navStripWrapper"> <ul class="nav fix"> <li><a href="<?php echo get_settings('home'); ?> /" title="Return to the the frontpage">Frontpage<br /><span>Return home</span></a></li> <li><a id="triggerCatID2" href="#" title="Show categories">Browse<br /><span>By topic</span></a></li> <li class="last"><a href="<?php bloginfo('rss2_url'); ?> " title="Subscribe to the main feed via RSS">Subscribe<br /><span>RSS feed</span></a></li> <li id="searchBar"> <?php include TEMPLATEPATH . '/searchform.php'; ?> </li> </ul> <div id="footerStrip" class="toggleCategories fix" style="display: none;"> <ul class="fix"> <?php wp_list_cats('sort_column=name&optioncount=0&exclude=10, 15'); ?> </ul> </div> </div>
<div id="obar"> <div class="sub-obar"> <ul> <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(2)) { ?> <li><h2>Categories</h2> <ul> <?php wp_list_cats('sort_column=name&optioncount=0&children=0'); ?> </ul> </li> <li><h2><?php _e('Archives'); ?> </h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <?php wp_list_bookmarks(); } ?> </ul>
</div> <!-- [sb-about] --> <div id="sidebar1"> <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) { ?> <h2><?php _e('Categories'); ?> </h2> <ul> <li><?php wp_list_cats('sort_column=name'); ?> </li> </ul> <h2>Feeds</h2> <ul id="feed"> <li><a href="<?php bloginfo('rss2_url'); ?> " rel="nofollow" title="<?php _e('Subscribe to RSS'); ?> "><?php _e('RSS Posts'); ?>
the_ID(); ?> " class="post single-post"> <h2 class="post-title-single"><?php the_title(); ?> </h2> <div class="post-entry"> <?php the_content(); ?> <div style="clear:both;width:45%;padding:0 1em;float:left;"> <p style="margin-bottom:0;"><strong>Categories</strong></p> <ul style="margin-top:0;"> <?php wp_list_cats('sort_column=name&optioncount=1&feed=(Atom)&feed_image=' . get_bloginfo('template_url') . '/images/feed.png&hierarchical=1'); ?> </ul> </div> <div style="width:45%;padding:0 1em;float:left;"> <p style="margin-bottom:0;"><strong>Archives</strong></p> <ul style="margin-top:0;"> <?php wp_get_archives('type=monthly&show_post_count=1'); ?> </ul> </div> <div class="clearer"></div> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
</h3> <ul class="archive-list"> <?php wp_get_archives('show_post_count=1'); ?> </ul> <br class="clear" /> <h3><?php _e('Browse by Category', 'k2_domain'); ?> </h3> <ul class="archive-list"> <?php wp_list_cats('hierarchical=0&optioncount=1'); ?> </ul> <br class="clear" /> </div> <!-- .entry-content --> </div> <!-- #post-ID --> </div> <!-- #current-content .hfeed --> <div id="dynamic-content"></div> </div> <!-- #primary --> <?php get_sidebar();
?> </ul> </li> <li class="sidebox"> <h3><?php $child = array_key_exists('cat', $_REQUEST) ? '&child_of=' . $_REQUEST['cat'] : ''; _e($child ? 'Sub categories' : 'Categories', 'ml'); ?> </h3> <ul> <?php if (function_exists('wp_list_categories')) { wp_list_categories('show_count=1&depth=1&&hierarchical=1&title_li=' . $child); } else { wp_list_cats('optioncount=1'); } ?> </ul> </li> <li class="sidebox"> <h3><?php _e('Meta', 'ml'); ?> </h3> <ul> <?php wp_register(); ?> <li><?php wp_loginout();
function _b_wp_categories_show($options, $wp_num = "") { $block_style = $options[0] ? $options[0] : 0; $with_count = $options[1] ? $options[1] : 0; $sorting_key = $options[2] ? $options[2] : 'name'; $sorting_order = $options[3] ? $options[3] : 'asc'; if (current_wp()) { if (!empty($_SERVER['PATH_INFO'])) { permlink_to_param(); } init_param('GET', 'cat', 'string', ''); init_param('GET', 'category_name', 'string', ''); if (!empty($GLOBALS['category_name']) && empty($GLOBALS['cat'])) { if (stristr($GLOBALS['category_name'], '/')) { $GLOBALS['category_name'] = explode('/', $GLOBALS['category_name']); if ($GLOBALS['category_name'][count($GLOBALS['category_name']) - 1]) { $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 1]; // no trailing slash } else { $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 2]; // there was a trailling slash } } $categoryHandler =& wp_handler('Category'); $categoryObject =& $categoryHandler->getByNiceName($GLOBALS['category_name']); $GLOBALS['cat'] = $categoryObject->getVar('cat_ID'); } } if ($block_style == 0) { // Simple Listing ob_start(); block_style_get($wp_num); echo '<ul class="wpBlockList">' . "\n"; wp_list_cats("hide_empty=0&sort_column={$sorting_key}&sorting_order={$sorting_order}&optioncount={$with_count}"); echo '</ul>' . "\n"; $block['content'] = ob_get_contents(); ob_end_clean(); } else { // Dropdown Listing $file = wp_siteurl() . '/index.php'; $link = $file . '?cat='; ob_start(); block_style_get($wp_num); echo '<form name="listcatform' . $wp_num . '" id="listcatform' . $wp_num . '" action="#">'; $select_str = '<select name="cat" onchange="window.location = (document.forms.listcatform' . $wp_num . '.cat[document.forms.listcatform' . $wp_num . '.cat.selectedIndex].value);"> '; dropdown_cats(1, _WP_LIST_CAT_ALL, $sorting_key, $sorting_order, 0, $with_count, 0, false, 0, 0, true, 0, true, 0); echo '</form>'; $block_str = ob_get_contents(); ob_end_clean(); $block['content'] = ereg_replace('\\<select name\\=[^\\>]*\\>', $select_str, $block_str); } return $block; }
<div id="widgets_archives_b" class="widget_set archive_group even"> <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Archives_2')) { ?> <div id="categories"> <h2><?php _e("Categories", 'gluedideas_subtle'); ?> </h2> <p><?php _e('Find posts using the "tags" provided below.', 'gluedideas_subtle'); ?> </p> <ul class="icon category"> <?php wp_list_cats('hierarchical=0'); ?> </ul> </div> <?php } ?> </div> </div> <!-- Content End --> <?php get_footer();
</div> <!-- /primary --> <?php } } ?> <div class="secondary"> <?php if (get_tarski_option('show_categories')) { ?> <h3><?php _e('Category Archives', 'tarski'); ?> </h3> <ul class="archivelist xoxo"> <?php wp_list_cats('sort_column=name&sort_order=desc'); ?> </ul> <?php } ?> <?php th_sidebar(); ?> </div> <!-- /secondary --> <?php get_footer();
<?php wp_list_pages('title_li=<h2>Pages</h2>'); ?> <li><h2>Archives</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <li><h2>Categories</h2> <ul> <?php wp_list_cats('sort_column=ID&optioncount=1&hierarchical=1'); ?> </ul> </li> <li> <?php ec3_get_calendar(); ?> </li> <li><?php _e('Next 5 Events'); ?> <?php ec3_get_events(5); ?>
<!-- begin sidebar --> <div id="menu"> <ul> <?php wp_list_pages(); ?> <?php get_links_list(); ?> <li id="categories"><?php _e('Categories:'); ?> <ul> <?php wp_list_cats(); ?> </ul> </li> <li id="search"> <label for="s"><?php _e('Search:'); ?></label> <form id="searchform" method="get" action="<?php bloginfo('home'); ?>"> <div> <input type="text" name="s" id="s" size="15" /><br /> <input type="submit" value="<?php _e('Search'); ?>" /> </div> </form> </li> <li id="archives"><?php _e('Archives:'); ?> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <li id="meta"><?php _e('Meta:'); ?> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <li><a href="feed:<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<h4>Pages</h4> <ul> <?php wp_list_pages('title_li='); ?> </ul> <h4>Categories</h4> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS&hide_empty=0'); ?> </ul> <h4>Archives</h4> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> <h4>Meta</h4> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?> </li> <li><a href="http://validator.w3.org/check/referer" title="This page should validate as XHTML 1.0 Strict">Validate the markup</a></li>
<ul> <?php wp_get_archives('limit='); ?> </ul> </li> <!-- Categories --> <li id="sb-cates"> <h2><?php _e('Categories'); ?> </h2> <ul> <?php wp_list_cats('hide_empty=1&hierarchical=1'); //wp_dropdown_categories(); ?> </ul> </li> <!-- Misc --> <li id="sb-misc"> <h2><?php _e('Misc'); ?> </h2> <ul> <?php wp_register(); ?>
function widget_categories($args) { extract($args); $options = get_option('widget_categories'); $c = $options['count'] ? '1' : '0'; $h = $options['hierarchical'] ? '1' : '0'; $title = empty($options['title']) ? __('Categories') : $options['title']; ?> <?php echo $before_widget; ?> <?php echo $before_title . $title . $after_title; ?> <ul> <?php wp_list_cats("sort_column=name&optioncount={$c}&hierarchical={$h}"); ?> </ul> <?php echo $after_widget; }
<div <?php post_class(); ?> > <h2>Archives by Month</h2> <ul> <?php wp_get_archives('type=monthly&show_post_count=1'); ?> </ul> <h2>Archives by Category</h2> <ul> <?php wp_list_cats('sort_column=name&optiondates=1&optioncount=1'); ?> </ul> <h2>All Posts</h2> <ol> <?php wp_get_archives('type=postbypost'); ?> </ol> </div> <?php get_sidebar(); ?>
<div id="footer-flickr" class="footer-column"> <?php if ($titan->flickrState() == 'true') { ?> <ul> <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer_sidebar')) { ?> <li class="widget widget_categories"> <h2 class="widgettitle"><?php _e('Categories'); ?> </h2> <ul> <?php wp_list_cats('sort_column=name&hierarchical=0'); ?> </ul> </li> <?php } ?> </ul> <?php } else { ?> <h2><?php _e('Flickr', 'titan'); ?> </h2> <?php
</div> <p style="padding: 0px; margin-top: 0px; margin-bottom: 0px;"><input type="text" class="input" name="s" id="search" size="15" /> <input name="submit" type="submit" tabindex="5" value="<?php _e('GO', 'benevolence'); ?> " /></p> </form> </li> <li> <h2><?php _e('Categories', 'benevolence'); ?> </h2> <?php wp_list_cats('list=0'); ?> </li> <li> <h2><?php _e('Archives', 'benevolence'); ?> </h2> <?php wp_get_archives('type=monthly&format=other&after=<br />'); ?> </li> <li> <h2 class="title"><?php
?> </h2> <div class="entry-content"> <?php the_content(); ?> <ul id="archives-page" class="xoxo"> <li id="category-archives" class="content-column"> <h3><?php _e('Archives by Category', 'sandbox'); ?> </h3> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS'); ?> </ul> </li> <li id="monthly-archives" class="content-column"> <h3><?php _e('Archives by Month', 'sandbox'); ?> </h3> <ul> <?php wp_get_archives('type=monthly&show_post_count=1'); ?> </ul> </li>
<?php wp_get_archives('type=monthly&show_post_count=1'); ?> </ul> </li> <!-- Categories --> <li id="sb-cates"> <h2><?php _e('Categories'); ?> </h2> <ul> <?php wp_list_cats('sort_column=id&hide_empty=0&optioncount=1&hierarchical=1'); ?> </ul> </li> <!-- Feeds --> <li id="sb-feeds"> <h2><?php _e('Feeds'); ?> </h2> <ul> <li><a href="<?php bloginfo('rss2_url');
wp_tag_cloud('smallest=12&largest=16'); ?> </div> </div> <div class="side_bottom"> </div> </div> <div class="side_block"> <div class="side_mid"> <h3><?php echo _e('Cats', 'lighterblue'); ?> </h3> <ul> <?php wp_list_cats('sort_column=name&optioncount=0&depth=1'); ?> </ul> </div> <div class="side_bottom"> </div> </div> <div class="side_block"> <div class="side_mid"> <h3><?php echo _e('Meta', 'lighterblue'); ?> </h3> <ul> <?php wp_register();
<div class="h2"><a href="http://zhiqiang.org/blog/recommend">精华区</a></div> <ul> <?php get_same_category_post("677", 10, "", "RAND()", 780); ?> </ul> <?php corner_end(); ?> </dd> <dd class="sc"><?php corner_start("noa cat"); ?> <div class="h2">分类</div> <ul><?php wp_list_cats("sort_column=name&optioncount=1&feed=RSS"); ?> </ul> <?php corner_end(); ?> </dd> <dd class="sc"><?php corner_start(""); ?> <?php include TEMPLATEPATH . '/subscribe.php'; ?> <?php corner_end(); ?>
<?php wp_list_pages('title_li=<h2>Pages</h2>'); ?> <li><h2>Archives</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <li><h2>Categories</h2> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> </li> <?php /* If this is the frontpage */ if (is_home() || is_page()) { ?> <?php get_links_list(); ?> <li><h2>Meta</h2> <ul>
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(2)) { } else { ?> <li id="pages"><?php _e('<h2>Pages</h2>'); ?> <ul> <?php wp_list_pages('sort_column=menu_order&title_li='); ?> </ul> </li> <li id="categories"><?php _e('<h2>Categories</h2>'); ?> <ul> <?php wp_list_cats(''); ?> </ul> </li> <?php } ?> </ul>
/** * @since 0.71 * @deprecated 2.1 * @deprecated Use wp_list_categories() * @see wp_list_categories() * * @param int $optionall * @param string $all * @param string $sort_column * @param string $sort_order * @param string $file * @param bool $list * @param int $optiondates * @param int $optioncount * @param int $hide_empty * @param int $use_desc_for_title * @param bool $children * @param int $child_of * @param int $categories * @param int $recurse * @param string $feed * @param string $feed_image * @param string $exclude * @param bool $hierarchical * @return unknown */ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children = false, $child_of = 0, $categories = 0, $recurse = 0, $feed = '', $feed_image = '', $exclude = '', $hierarchical = false) { _deprecated_function(__FUNCTION__, '2.1', 'wp_list_categories()'); $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children', 'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); return wp_list_cats($query); }
</li> <?php }?> <?php wp_list_pages('title_li=<h2>' . __('Pages', 'xpress') . '</h2>' ); ?> <li><h2><?php _e('Archives', 'xpress'); ?></h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <?php if(function_exists('wp_list_categories')) : ?> <?php wp_list_categories('show_count=1&title_li=<h2>' . __('Categories', 'xpress') . '</h2>'); ?> <?php else : ?> <li><h2><?php _e('Categories', 'xpress'); ?></h2> <ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?></ul></li> <?php endif; ?> <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> <?php if(function_exists('wp_list_bookmarks')) : ?> <?php wp_list_bookmarks(); ?> <?php endif; ?> <li><h2><?php _e('Meta', 'xpress'); ?></h2> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional', 'xpress'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>', 'xpress'); ?></a></li> <li><a href="http://gmpg.org/xfn/"><abbr title="<?php _e('XHTML Friends Network', 'xpress'); ?>"><?php _e('XFN', 'xpress'); ?></abbr></a></li> <li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'xpress'); ?>">WordPress</a></li> <?php wp_meta(); ?>