---
title: Hooks and filters
description: The filters Pawtani provides, with examples.
url: "https://wpruby.com/knowledgebase/pawtani-hooks/"
updated: "2026-11-04"
category: WPRuby Themes / Pawtani
---

# Hooks and filters

Pawtani provides the filters below. Put the code in the [child theme](https://wpruby.com/knowledgebase/pawtani-child-themes/)'s `functions.php` or in a small plugin.

Table of Contents

 [Toggle](#)

- [pawtani_shop_by_pet and pawtani_shop_by_need](#pawtani_shop_by_pet_and_pawtani_shop_by_need)
- [pawtani_navigation_links](#pawtani_navigation_links)
- [pawtani_filter_attribute_order](#pawtani_filter_attribute_order)
- [pawtani_filter_chip_attributes](#pawtani_filter_chip_attributes)
- [pawtani_size_guide_id](#pawtani_size_guide_id)
- [pawtani_newsletter_form](#pawtani_newsletter_form)
- [pawtani_wishlist_url](#pawtani_wishlist_url)
- [pawtani_social_links](#pawtani_social_links)
- [Data Pawtani stores](#Data_Pawtani_stores)

## `pawtani_shop_by_pet` and `pawtani_shop_by_need`

The cards in the homepage's **Shop by pet** and **Shop by need** sections, the header menu and the default footer. Each item is an array with `slug` (product category slug), `label`, `text`, `image` (a file in the theme's `assets/images/`, used when the category has no thumbnail) and `color` (a palette slug for the card background).

```
add_filter( 'pawtani_shop_by_pet', function ( $pets ) {
	$pets[] = array(
		'slug'  => 'reptiles',
		'label' => __( 'Reptiles', 'my-store' ),
		'text'  => __( 'Heat, light and hideaways', 'my-store' ),
		'image' => 'pet-small.webp',
		'color' => 'highlight-soft',
	);
	return $pets;
} );
```

## `pawtani_navigation_links`

The header menu's blocks (serialized block markup), after Pawtani builds them from the categories or the **Pawtani menu**.

## `pawtani_filter_attribute_order`

The attribute slugs shown first in the catalog filters, in order. Default `pet`, `size`, `pack-size`, `flavor`, `life-stage`. Other attributes follow.

## `pawtani_filter_chip_attributes`

The attribute slugs shown as chips instead of checkboxes. Default `pet`, `size`, `pack-size`, `life-stage`.

```
add_filter( 'pawtani_filter_chip_attributes', function ( $slugs ) {
	$slugs[] = 'color';
	return $slugs;
} );
```

## `pawtani_size_guide_id`

The size guide (a `wp_block` post ID, `0` for none) shown for a product. The second argument is the product ID.

```
add_filter( 'pawtani_size_guide_id', function ( $guide_id, $product_id ) {
	return has_term( 'gift-cards', 'product_cat', $product_id ) ? 0 : $guide_id;
}, 10, 2 );
```

## `pawtani_newsletter_form`

The newsletter form's HTML. Default: the shortcode set on **Appearance → Pawtani**, rendered. Return an empty string to show the journal link instead.

## `pawtani_wishlist_url`

The wishlist page URL for the header's heart icon. Default: the YITH or TI WooCommerce Wishlist page. Return a URL to support another plugin, or an empty string to hide the icon.

## `pawtani_social_links`

The footer's social links, as service => URL. Default: the profiles set on **Appearance → Pawtani**.

## Data Pawtani stores

| Where | Key | What |
| --- | --- | --- |
| Option | `pawtani_settings` | Newsletter shortcode and social profiles |
| Product meta | `_pawtani_size_guide` | The product's size guide |
| Category term meta | `pawtani_size_guide` | The category's size guide |
| Option | `pawtani_starter` | The installed starter site and what it replaced |
| Option | `pawtani_demo_hidden` | Products and posts a starter moved to drafts |
| Post, term meta | `_pawtani_demo` | Marks sample content, so removing a starter deletes only that |
