本网站开发的WordPress多条件过滤插件& # 8211;Wizhi多重滤镜

Wordpress2年前 (2023)发布 SUYEONE
1.6K 0 0

The original text seems to be a guide on how to use a WordPress plugin called “Wizhi Multi Filters.” Here’s a rewritten version with 70% originality:

I recently discovered that the site no longer supports the plugin in question, but for those who are interested, I’ve prepared an installation and usage tutorial. In my previous post, I shared techniques to filter WordPress content based on various conDiTions. Several readers reached out, asking for more detAIls. While the article was comprehensive, I understand the appeal of simplicity and efficiency. As a programmer, laziness can often lead to innovation and time-saving solutions. Thus, I dedicated a day to create a plugin that implements these functionalities, naming it “Wizhi Multi Filters.”

Below is a screenshot dEMOnstrating the plugin’s effect. The categories “Subject,” “Specialty,” and “Qualification” are customizable taxonomies, and their respective filtering options can be edited in the backend. Clicking on these filters instantly modifies the displayed content.

**Wizhi Multi Filters Plugin Configuration**

Please note that this plugin requires custom post types and taxonomies. If you need guidance on creating them, refer to the Wizhi CMS plugin or official WordPress documentation on custom post types and taxonomies.

The plugin offers basic settings, such as:

1. **Select Post Types to Filter**: Choose a custom post type to filter.
2. **Select Taxonomies to Filter**: Pick one or more custom taxonomies as filter criteria. Ensure these taxonomies are associated with the chosen post type.
3. **Don’t Output Default CSS**: Disabling this will prevent the plugin from outputting default CSS styles, requiring you to add them manually to your theme.

To display the Wizhi Multi Filters conditions in your theme, insert the following code snippet into a custom page template or a custom taxonomy archive page:

“`php
wizhi_get_filter_object(); // Filter WP_Query instance
?>
“`

For versions 1.5 and later, supporting multiple post types, simply add the function before the main loop:

“`php

“`

And then output the filtered content using a standard WordPress query:

“`php

“`

**Future Updates**

This is the initial version of Wizhi Multi Filters, and there’s room for improvement. Based on user feedback and potential enhancements, future updates may include:

– Simplified code and default templates for easier usage.
– Backend options to show/hide filter items (completed on 2015/06/08).
– Static URLs for seo friendliness (completed).
– Improved plugin settings, displaying associated taxonomies with selected post types for better UX (completed on 2015/06/20).
– Customizable sorting options for articles (planned).
-分离文章排序功能到一个独立的插件 (not mentioned when completed).
– Search functionality within filtered custom taxonomy posts (planned).
– Default post types and taxonomy name modifications in the backend (completed on 2015/07/06).
– Support for multiple post types, with categories automatically shown as filter criteria (completed on 2015/07/09).

**Important Notes Before Using the Plugin**

“Wizhi Multi Filters” only works with custom post types and doesn’t filter default posts or pages. It functions correctly on custom post type archives but might not behave as expected on the homepage or custom pages.

Due to its underlying mechanics, certain features are challenging to implement, such as static URLs and filtering default posts. To overcome these limitations, I developed a theme based on multi-criteria filtering, offering advanced features like URL statics, support for multiple post types, and keyword generation based on filter conditions. This feature is exclusive to custom themes and available upon request.

The plugin is now available in the official WordPress repository at . You can download it directly or search for “Wizhi Multi Filters” in your WordPress dashboard. If you have any feedback or suggestions, please feel free to share them.

© 版权声明

相关文章

暂无评论

暂无评论...
☺一键登录开启个人书签等功能!