Category Folder Shortcode requires WooCommerce to be installed and activated. '; }); return false; } return true; } // Shortcode to display categories as folders function themeslot_category_folder_shortcode( $atts ) { if ( ! themeslot_check_woocommerce() ) return ''; $atts = shortcode_atts( array( 'name' => '', 'color' => '#FFD700', // Default folder color (Gold) 'hover' => '#FFA500' // Default hover color (Orange) ), $atts ); $category_name = sanitize_text_field( $atts['name'] ); if ( empty( $category_name ) ) return ''; $folder_color = sanitize_hex_color( $atts['color'] ) ?: '#FFD700'; $hover_color = sanitize_hex_color( $atts['hover'] ) ?: '#FFA500'; // Get category object $category = get_term_by( 'name', $category_name, 'product_cat' ); if ( ! $category ) return ''; // Get category link $category_link = get_term_link( $category ); // Folder display $output = ' '; $output .= ''; $output .= ' '; $output .= '' . esc_html( $category->name ) . ''; $output .= ' '; return $output; } add_shortcode( 'folder', 'themeslot_category_folder_shortcode' ); // Display only subcategories (NOT products) at the end of the category page function themeslot_subcategories_only() { if ( ! function_exists( 'is_product_category' ) || ! is_product_category() || ! themeslot_check_woocommerce() ) return; $category = get_queried_object(); if ( ! $category || empty( $category->term_id ) ) return; $category_id = $category->term_id; // Get subcategories $subcategories = get_terms( array( 'taxonomy' => 'product_cat', 'parent' => $category_id, 'hide_empty' => false, 'orderby' => 'name', 'order' => 'ASC' )); if ( ! empty( $subcategories ) ) { echo ' '; foreach ( $subcategories as $subcategory ) { $subcategory_link = get_term_link( $subcategory ); echo ' '; echo ''; echo ' '; echo '' . esc_html( $subcategory->name ) . ''; echo ' '; } echo ' '; } } // Run after all WooCommerce content add_action( 'woocommerce_after_main_content', 'themeslot_subcategories_only', 20 ); // Plugin styles function themeslot_category_folder_styles() { echo ''; } add_action( 'wp_head', 'themeslot_category_folder_styles' );Remove the folder hovering effect And do not change the folder icon and color in a full script. Pro Files - Page 5 of 36 - TECHFIXA
Skip to content
[custom_product_list]

Showing 65–80 of 569 results

Load More

📌 Copyright © 2025 TechFixa. All Rights Reserved. Designed & Maintained by TechFixa Team.