WP Manifestindependent plugin directory
manifest / content / custom-filter

Custom Filters

A Plugin For Custom Filters In Wordpress.

by Hassan Ali Askari · github.com/hassan7303/custom-filter · website

9stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/hassan7303/custom-filter/archive/refs/heads/master.zip

Readme

LinkedIn Telegram Instagram GitHub Email

Custom Filters Plugin Documentation

Plugin Information

  • Plugin Name: Custom Filters
  • Description: A Plugin For Custom Filters In WordPress.
  • Version: 1.0.0
  • Author: Hassan Ali Askari
  • Author URI: Telegram
  • Plugin URI: GitHub
  • License: MIT
  • License URI: MIT License
  • Email: hassanali7303@gmail.com
  • Domain Path: Domain

Installation

  1. Download the plugin.
  2. Upload the plugin folder to the /wp-content/plugins/ directory.
  3. Activate the plugin through the 'Plugins' menu in WordPress.

Usage

Shortcode

To display the custom filters in your posts or pages, use the following shortcode:

[custom_filters]

Filter Structure And Features

This plugin creates a tabbed filter system for car products in WooCommerce. It includes:

  • Tabbed Interface: Filter products based on car types (Light Vehicles, Heavy Vehicles, API/SAE, Industrial).
  • Brand Selection: Choose brands based on car types.
  • Category Filtering: Filter products by category.
  • AJAX Search: Filter results are loaded without page refresh using AJAX.

Tabs

  1. Light Vehicles (خودروهای سبک):

    • Filters include Brand and Car.
  2. Heavy Vehicles (خودروهای سنگین):

    • Filters include Brand and Car.
  3. API / SAE:

    • Select different levels of API or SAE.
  4. Industrial (صنعتی):

    • Redirects to a product category page with industrial products.

Filters and Taxonomies

This plugin uses WooCommerce product taxonomies for filtering:

  • pa_brand: Brand taxonomy for cars.
  • pa_car: Car taxonomy.
  • product_cat: Product categories.

Example Code Snippets

To fetch terms for the filter dropdowns:


$brand_terms = get_terms(array(
    'taxonomy' => 'pa_brand',
    'hide_empty' => false,
));

Read the full README on GitHub →