Plugin Name
开发者 |
Filip Wallberg
|
更新时间 |
2010年10月14日 11:06 |
PHP版本: |
2.9.2 及以上 |
WordPress版本: |
3.0 |
详情介绍:
WordPress is a great CMS. But until now one critical function has been missing: You haven't been able to sort each category.
But now you can - with this amazing plugin: PrioCat.
The plugin uses Custom Fields to sort the posts.
This plugin use Scriptaculous.
安装:
- Upload the folder PrioCat to the
/wp-content/plugins/
directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Place
if (is_category()): if($_REQUEST[cat]): $cat_id = $_REQUEST[cat]; else: $wp_terms = $wpdb->prefix . "terms"; $cat_id = single_cat_title("", false); $sql15 = $wpdb->get_results("SELECT term_id FROM $wp_terms WHERE name = '$cat_id' limit 1"); foreach($sql15 as $sql16) { $cat_id = $sql16->term_id; } endif; $cat_priot = "cat_priot_" . $cat_id; $posts = query_posts($query_string. '&orderby=meta_value_num&meta_key=' . $cat_priot . '&order=ASC' ); endif;
in the template archive.php. Before get_header();. If you don't have a archive.php, then place the code in the template index.php.
更新日志:
0.1
- The first stable version of PrioCat.
0.2
- Updated PHP-code to the templates.
0.3
- Updated PHP-code in the admin and templates.