CPT Filter Slider is a lightweight yet powerful WordPress plugin designed to help users filter and display custom post types (CPT) such as products, services, or other items in a user-friendly slider format. The plugin's main functionality is to filter items or products by category, enabling users to easily browse through specific items without the need for extensive page loads.
Table Of Contents
This plugin allows you to assign categories to items, and once a category is selected, only the items within that category are displayed, providing a smooth and efficient filtering experience. It is particularly useful for e-commerce websites or any WordPress site that needs to organize and present content in a structured, categorized manner.
The CPT Filter Slider plugin is versatile and can be used in a variety of scenarios where filtered content display is essential. Below are a few common use cases where the plugin excels:
On an e-commerce website, you might have multiple categories like "Clothing," "Electronics," or "Home Goods." By using CPT Filter Slider, you can allow users to easily filter products by category. For instance, when a customer clicks on "Clothing," only the products in that category will be shown, making it easier for users to browse and find the items they want. This can enhance the shopping experience and potentially boost conversions.
For websites offering various services (e.g.,tools, legal firms, consultants, or agencies), the plugin can be used to categorize and display services based on industry, expertise, or pricing. When visitors choose a specific category, they only see services that fit their needs, making the selection process faster and more intuitive.
Real estate websites with multiple property types such as "Residential," "Commercial," or "Land" can leverage the CPT Filter Slider plugin. Visitors can filter properties by category and view only the listings that match their criteria, improving navigation and overall user experience on the site.
Step 01: First we have to go to the wordpress dashboard.
Step 02: Then we have to click the Plugins option from the dashboard. Then we have to click “Add New Plugin” button , from there we have to click “Upload Plugin”. Then we have to choose the plugin from our device. Then we have to click install button. Here we can Active The Plugin or we may active it later from Plugins options
Step 03: After activation we will see a new option called “Tools” to our wordpress dashboard like below
Step 04: Then we have to go back to Tools options and add some categories as per our need.
Step 05: Now clicking on this Tools option we can add tool item by clicking on “Add New” Button. We can add a tool like below and customize it and publish it
Step 06: After Publishing we will see all the tools by categories on that page like below. If there are more than eight items in a category then we can slide the tools.
Note: This post doesn't have a single post view cause when we built it there was no such requirement but if you need you can contact us.
Use our recommended page builder plugin, FancyPost to unlock a number of powerful blocks to help you to design amazing websites!
Step 01:
Step 02:
[cpt-filter-slider]
Step 03:
Basic customization
You can change title or category latter clicking on quick edit
You can change everything latter clicking on edit
Click the button below to explore a live demo of the CPT Filter Slider plugin. Experience how easy it is to filter and display custom post types, such as products, services, or other items, in a sleek slider format. See the smooth filtering process by category and understand how the plugin can help you enhance browsing efficiency and user experience on your website.
Ready to improve the way you display your custom post types? Click the button below to download the CPT Filter Slider plugin and start organizing and showcasing your content with an efficient filtering slider. Ideal for e-commerce websites or any site that needs structured content presentation, this plugin will make browsing fast and intuitive for your users.
The CPT to Category Filter & Slider plugin is built with flexibility in mind, making it easy for developers to extend or customize its functionality to suit specific needs. Below, you'll find resources and examples on how to integrate the plugin with custom code, use available hooks, filters, and more.
To help developers customize the plugin, we have included a variety of action hooks and filters. These can be used to modify the plugin’s output or behavior without directly modifying the core code, ensuring that your customizations remain intact after updates.
Available Hooks:
cpt_filter_slider_before: This action fires before the slider is rendered, allowing developers to inject custom content or functionality.
PHP
add_action('cpt_filter_slider_before', 'custom_function_before_slider');
function custom_function_before_slider() {
echo '<div>Custom HTML or code before slider</div>';
}
cpt_filter_slider_after: This hook fires after the slider is rendered, ideal for adding additional content or elements after the slider.
add_action('cpt_filter_slider_after', 'custom_function_after_slider');
function custom_function_after_slider() {
echo '<div>Custom HTML or code after slider</div>';
}
Available Filters:
cpt_filter_slider_query: Modify the query used to fetch the custom post types for the slider. This is useful if you want to adjust the query parameters such as filtering by additional taxonomies or modifying the number of items displayed.
add_filter('cpt_filter_slider_query', 'modify_slider_query');
function modify_slider_query($query_args) {
$query_args['posts_per_page'] = 10;
return $query_args;
}
cpt_filter_slider_output: Customize the output of each item in the slider.
add_filter('cpt_filter_slider_output', 'custom_slider_item_output');
function custom_slider_item_output($output, $post) {
$output = '<div class="custom-slide">' . $post->post_title . '</div>';
return $output;
}
Here are some examples of how you can customize and extend the plugin:
Customizing the Slider Layout: Use the filter cpt_filter_slider_output to modify the HTML structure of the slider items. This is useful if you want to change the layout, add additional fields (like custom post meta), or modify the appearance.
add_filter('cpt_filter_slider_output', 'my_custom_slider_layout', 10, 2);
function my_custom_slider_layout($output, $post) {
$custom_field = get_post_meta($post->ID, 'custom_field', true);
$output = '<div class="slider-item">';
$output .= '<h3>' . $post->post_title . '</h3>';
$output .= '<p>' . $custom_field . '</p>';
$output .= '</div>';
return $output;
}
Modifying the Slider Query: Suppose you want to display only posts from a specific taxonomy, such as a custom category called “featured”. You can modify the query used by the shortcode as shown below.
add_filter('cpt_filter_slider_query', 'filter_featured_items');
function filter_featured_items($query_args) {
$query_args['tax_query'] = array(
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'featured',
),
);
return $query_args;
}
For more advanced usage, developers can extend the plugin’s functionality by creating their own add-ons or integrating it with other tools and plugins. You can:
We welcome contributions from developers! Whether you're fixing bugs, improving performance, or adding new features, your input is valuable. Feel free to submit pull requests on our GitHub page or contribute to discussions in the support forum.
Search, install and active the Duplicate Page plugin By mndpsingh287 like below to make copy of similar types of item
While there are other plugins that offer filtering and post grid solutions, here’s why CPT to Category Filter & Slider stands out as the best option for displaying custom post types in a user-friendly and customizable slider format:
By choosing CPT to Category Filter & Slider, you get the perfect balance between ease of use and powerful features, making it an ideal solution for anyone looking to showcase their content in a filtered, category-based slider format.
We’re constantly working to improve the CPT to Category Filter & Slider plugin and make it the best solution for filtering and displaying custom post types. We value your feedback and ideas!
Do you have a feature you’d like to see added? Is there something that could make the plugin work even better for your specific needs?
We carefully review all feature requests and community suggestions. Features that receive the most votes or align with our vision for the plugin may be added in future updates. You can also stay updated on the development process by checking our plugin roadmap.
If you’ve found the CPT to Category Filter & Slider plugin helpful and it has made your work easier, please consider making a donation.
Lorem ipsum dolor sit amet consectetur adipiscing elit quisque pharetra purus dictumst taciti.
Tellus etiam tincidunt erat neque ante ultricies nec litora porta faucibus risus mattis, pharetra id tempus est hendrerit congue nibh gravida vehicula facilisis.
Pharetra id tempus est hendrerit congue nibh gravida vehicula facilisis