--- title: Customize theme components description: >- Learn how to customize your Product and Collection components in your WordPress site using the Shopify plugin source_url: html: >- https://shopify.dev/docs/storefronts/headless/bring-your-own-stack/wordpress/customize-theme md: >- https://shopify.dev/docs/storefronts/headless/bring-your-own-stack/wordpress/customize-theme.md --- # Customize theme components This guide shows you how to customize the Shopify plugin components to match your theme's design. You'll learn to override the default components by creating custom PHP files in your theme directory. *** ## Before you start You need: * Write access to your WordPress theme files and directories * Understanding of WordPress theme structure * Basic knowledge of PHP and HTML *** ## Customize Product Card components The Product Card Component appears in product listings and collection pages, showing key product information like image, title, and price. ### Step 1: Create the override file Create a file named `product-card.php` in a `Shopify` folder within your theme directory: ```text . ├── wp-content │ └── themes │ └── theme_dir │ ├── assets │ ├── functions.php │ ├── parts │ ├── patterns │ ├── shopify # Shopify plugin customization │ │ └── product-card.php # Component customization override file │ ├── styles │ ├── templates │ └── theme.json │ ... ``` ### Step 2: Copy the default code Add this default code to your `product-card.php` file: ## {theme\_dir}/shopify/product-card.php ```html '; echo '

You must add a product.

'; echo ''; return; } if ($has_context === false) { ?> ``` ### Step 3: Customize the component Now you can modify the HTML structure, CSS classes, or add custom styling. For example, to add a custom wrapper class: ```html
``` *** ## Customize Product Quick Views The Product Quick View modal displays when customers click "Quick Shop" on product cards, showing product details without leaving the current page. ### Step 1: Create the override file Create a file named `modal.php` in a `Shopify` folder within your theme directory: ```text . ├── wp-content │ └── themes │ └── theme_dir │ ├── assets │ ├── functions.php │ ├── parts │ ├── patterns │ ├── shopify # Shopify plugin customization │ │ └── modal.php # Component customization override file │ ├── styles │ ├── templates │ └── theme.json │ ... ``` ### Step 2: Copy the default code Add this code to your `modal.php` file: ## {theme\_dir}/shopify/modal.php ```html ``` ### Step 3: Customize the modal You can customize the modal layout, styling, or button text. For example, to change the close button: ```html ``` *** ## Customize Product Detail Pages The Product Detail Page shows the full product information including images, variants, description, and purchase options. ### Step 1: Create the override file Create a file named `pdp.php` in a `Shopify` folder within your theme directory: ```text . ├── wp-content │ └── themes │ └── theme_dir │ ├── assets │ ├── functions.php │ ├── parts │ ├── patterns │ ├── shopify # Shopify plugin customization │ │ └── pdp.php # Component customization override file │ ├── styles │ ├── templates │ └── theme.json │ ... ``` ### Step 2: Copy the default code Add this code to your `pdp.php` file: ## {theme\_dir}/shopify/pdp.php ```html