Linux 软件免费装
Banner图

Archivist - Custom Archive Templates

开发者 eteubert
更新时间 2024年2月23日 20:50
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 6.1.1

标签

html template shortcode tag custom category query archive loop customizable

下载

1.2.0 1.2.1 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.0.0 1.5.1 1.7.4 1.7.6 1.2.2 1.3.8 1.4 1.1.0 1.4.1 1.4.2 1.4.3 1.6 1.7 1.7.1 1.7.2 1.7.3 1.7.7

详情介绍:

Quick Start The plugin assumes your articles are well categorized. To display the archive, use the shortcode anywhere in a page or article. [archivist category="kitten"] [archivist tag="kitten"] Replace "kitten" with your category/tag. Watch out, we need the slug here. That's the name without capital letters and spaces. Placeholders You can specify a custom template to display the archive elements. Go to Settings > Archivist for plugin preferences. Use HTML and any of the following template placeholders. You can add your own placeholders: add_filter( 'archivist_template_render', function( $template, $post ) { // modify $template return $template; }, 10, 2 ); Pagination If you have many entries, you may prefer to paginate. The archivist comes with asynchronous pagination built-in. Use the pagination parameter in the shortcode to activate it. Its value is the amount of items you want to display per page. [archivist category="kitten" pagination="10"] Pagination controls are displayed both on top and at the bottom of the archive. You can customize this by setting controls to top or bottom. [archivist category="kitten" pagination="10" controls="top"] Filter by Query Are you feeling bold? Is filtering by category or archive not satisfying you? Read on, I've got a challenge for you. WordPress uses a certain query syntax to define the so called loop which is used to display the archive. You can find the complete documentation at http://codex.wordpress.org/Class_Reference/WP_Query and you can take advantage of every single parameter or combination of parameters listed there. Some examples: [archivist query="year=1984&author_name=gorwell"] Lists all entries from the year 1984 by the author with user_nicename gorwell. [archivist query="tag=straw+mask&post_status=private&orderby=comment_count&order=DESC"] Lists all entries marked with post status private which are tagged with both straw and mask, ordered by the amount of comments in a descending order. Using multiple Templates When you install the plugin, there is just one templated called "default". If you don't specify a specific template in the shortcode, this one will be used. Therefore the following two shortcodes yield identical results. [archivist category="kitten"] [archivist category="kitten" template="default"] You can add as many templates as you like. Think twice before deleting one. If it's still in use, the archive can't be displayed.

安装:

  1. Upload the archivist directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Place [archivist category="kitten"] in your archive post or page

屏幕截图:

  • Example Archive

升级注意事项:

0.9 to 1.0
  • change your shortcodes to [archivist ...]

更新日志:

1.7.7 1.7.5 1.7.4 1.7.3 1.7.2 1.7.1 1.7 This update is sponsored by Light Aware. 1.6 1.5.1 1.5 1.4.1 1.4 1.3.8 1.3.7 1.3.6 1.3.4 & 1.3.5 1.3.3 1.3.2 1.3.1 1.3.0 1.2.2, 1.2.3 1.2.1 1.2.0 1.1.0 1.0.1 1.0 0.9