If you need the product page, cart, or account area to match a custom theme design, you can override the plugin’s PHP templates from your theme. You should not edit files inside the plugin folder, updates would overwrite your work.
How Overrides Work
- Copy a template from the plugin’s
public/templates/directory. - Place the copy in your theme (preferably a child theme) at:
your-theme/avenia-digital-products/template-name.php
- Edit the copy in your theme.
WordPress loads your theme file instead of the plugin’s when the path matches.
Useful Templates
Catalog and lists:
catalog-grid.php
archive-aveniadp_product.php
taxonomy-aveniadp_product_category.php
taxonomy-aveniadp_product_tag.php
Single product:
single-product.php and related partials for gallery, pricing, and similar sections
Cart and checkout:
cart.php
cart-drawer.php
checkout.php
Account:
account.php
login.php
Single Product Layout
By default the plugin replaces the theme’s normal post content on product pages with its own layout. To use your theme’s single template and build the layout yourself, add this to your theme’s functions.php or a small custom plugin:
add_filter( 'aveniadp_use_custom_single_product_layout', '__return_false' );
When that filter returns false, you are responsible for displaying product data and purchase controls. For all available hooks, see Hooks and Filters.
Classic theme content wrapper
Classic (non-block) themes use PHP shell templates for the product catalog, single product pages, and category/tag archives:
archive-aveniadp_product.php
single-aveniadp_product.php
taxonomy-aveniadp_product_category.php
taxonomy-aveniadp_product_tag.php
Each template calls get_header(), outputs the plugin content, then get_footer(). Between the header and footer, the plugin wraps content in generic <div> / <main> markup so product pages look like normal theme pages.
If those wrapper IDs or classes do not match your theme’s page.php, product pages can look misaligned (wrong sidebar width, missing content-area styles, and similar layout issues). You can fix this without copying entire template files by hooking into:
aveniadp_before_main_content
aveniadp_after_main_content
The plugin registers default handlers at priority 10: aveniadp_output_content_wrapper() and aveniadp_output_content_wrapper_end(). Remove those and add your own callbacks that echo the same opening and closing markup as page.php:
remove_action( 'aveniadp_before_main_content', 'aveniadp_output_content_wrapper', 10 );
remove_action( 'aveniadp_after_main_content', 'aveniadp_output_content_wrapper_end', 10 );
add_action( 'aveniadp_before_main_content', 'my_theme_aveniadp_wrapper_start', 10 );
add_action( 'aveniadp_after_main_content', 'my_theme_aveniadp_wrapper_end', 10 );
function my_theme_aveniadp_wrapper_start() {
// Match markup from your theme's page.php.
echo '<div id="content" class="site-content"><main id="primary">';
}
function my_theme_aveniadp_wrapper_end() {
echo '</main></div>';
}
Place this in your child theme’s functions.php or a small custom plugin. Copy the exact element IDs, classes, and nesting from page.php. The example above is illustrative only.
Default wrapper markup (when you do not override):
If you only need different classes on the default <main> element, filter aveniadp_main_content_classes instead of replacing the whole wrapper. See Hooks And Filters.
Block themes do not use these hooks, they use HTML templates in templates/ (see BLOCK THEMES below).
Block Themes
Full Site Editing (block) themes use HTML templates in the theme’s templates/ directory instead of PHP files. The plugin ships four reference HTML starters in:
avenia-digital-products/templates/
The plugin does not register or load these files. They exist only as examples to copy into your theme (or child theme). If your theme does not provide product templates, the plugin still works: it uses the theme’s default block templates and injects the catalog grid or single-product layout through hooks.
How to use the html starters
- Copy one or more files from the plugin’s
templates/folder. - Paste them into your theme at the same path and filename: your-theme/templates/archive-aveniadp_product.html
your-theme/templates/single-aveniadp_product.html
your-theme/templates/taxonomy-aveniadp_product_category.html
your-theme/templates/taxonomy-aveniadp_product_tag.html - Edit the copy in your theme. Keep the files under version control in the child theme when possible.
WordPress picks up theme templates automatically when the filename matches the post type or taxonomy.
When to copy which template
archive-aveniadp_product.html
Used for the main product catalog URL (all products).
Includes the Products block so you control columns and layout in the Site Editor.
single-aveniadp_product.html
Used for individual product pages.
Uses the Post Content block; the plugin renders purchase UI inside post content.
taxonomy-aveniadp_product_category.html
Used when visitors browse a product category archive.
Shows the archive title and the Products block (filtered to that category).
taxonomy-aveniadp_product_tag.html
Used when visitors browse a product tag archive.
Same structure as the category template, for tag URLs.
Blocks used in the starters
Header and footer
Standard template parts: header and footer. Your theme must define matching template parts or swap the slugs.
Products block (wp:avenia-digital-products/products)
Renders the catalog grid. Attributes used in the examples: columns (default 3). See shortcodes-and-blocks.txt for more block options.
Post Content block (wp:post-content)
On single product pages, outputs the product body; the plugin hooks in gallery, pricing, and purchase controls.
Query Title block (wp:query-title)
On taxonomy archives, outputs the category or tag name as the page heading.
EXAMPLE: archive-aveniadp_product.html
Product catalog archive. Copy into your-theme/templates/archive-aveniadp_product.html.
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--60)">
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:avenia-digital-products/products {"columns":3} /-->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
EXAMPLE: single-aveniadp_product.html
Single product page. Copy into your-theme/templates/single-aveniadp_product.html.
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--60)">
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:post-content {"align":"full","layout":{"type":"constrained"}} /-->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
EXAMPLE: taxonomy-aveniadp_product_category.html
Category archive. Copy into your-theme/templates/taxonomy-aveniadp_product_category.html.
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing|60)">
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:query-title {"type":"archive","textAlign":"left","level":1} /-->
<!-- wp:avenia-digital-products/products {"columns":3} /-->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
EXAMPLE: taxonomy-aveniadp_product_tag.html
Tag archive. Copy into your-theme/templates/taxonomy-aveniadp_product_tag.html.
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--60)">
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:query-title {"type":"archive","textAlign":"left","level":1} /-->
<!-- wp:avenia-digital-products/products {"columns":3} /-->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
Customizing in the site editor
After the HTML files live in your theme, open Appearance → Editor → Templates. You can rearrange blocks, change spacing presets, or add sidebars and hero sections without editing the plugin.
If you previously customized product templates inside the Site Editor (saved in the database), those copies may still override your theme files. Delete them or use Clear customizations on each product template so your theme files take effect.
Styling Without Template Overrides
Many stores only need color changes. Use Settings → Appearance for buttons, tabs, borders, and cart/checkout panel backgrounds. For small tweaks, Appearance → Customize → Additional CSS is often enough.