WP Manifestindependent plugin directory
manifest / performance / api-plugin

Product API Plugin

WordPress plugin that fetches product data from an external API and displays it in a responsive UI with category filtering.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/shobhit-singhal/api-plugin/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

🛍️ WordPress Product API Plugin

A simple WordPress plugin that fetches product data from an external API and displays it in a clean, responsive UI with category-based filtering.


🚀 Features

  • Fetches product data from an external API (DummyJSON)
  • Displays products in a responsive card layout
  • Category-based filtering using URL parameters
  • Styled using Tailwind CSS (via CDN)
  • Built using WordPress hooks and shortcodes

🧠 What I Learned

  • WordPress plugin structure
  • Using hooks (add_action, add_shortcode)
  • Fetching API data using wp_remote_get()
  • Handling JSON using json_decode()
  • Rendering dynamic UI with PHP loops
  • Handling GET requests for filtering
  • Basic UI styling with Tailwind CSS

⚙️ Installation

  1. Download or clone this repository
  2. Place the plugin folder inside:
    wp-content/plugins/
  3. Go to WordPress Admin → Plugins
  4. Activate API Plugin

📌 Usage

Add this shortcode to any page or post:

[products]

🔍 Filter Example

You can filter products by category using:

?category=beauty

📸 Screenshot

Plugin UI


🛠️ Tech Stack

  • PHP
  • WordPress
  • Tailwind CSS (CDN)
  • DummyJSON API