// Shortcode for displaying stock products add_shortcode('ihk_stock_products', function() { ob_start(); include IHK_STOCK_PRODUCTS_PATH . 'templates/grid-view.php'; return ob_get_clean(); }); // Shortcode for displaying categories add_shortcode('ihk_product_categories', function() { // Fetch the categories $terms = get_terms([ 'taxonomy' => 'category', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false, ]); ob_start(); // Start output buffering if ($terms && !is_wp_error($terms)) { echo '
' . esc_html($term->description) . '
'; echo 'View Products'; echo '