WooCommerce stores rarely consist of products alone. Customers may need to find a product manual, compare a product with a related article, read a buying guide, or locate a support page before placing an order. A useful search experience therefore needs to connect posts, pages, products, and custom post types instead of treating each content type as an isolated collection.
WordPress supports this structure through post types, taxonomies, post metadata, and explicit relationships. WPSOLR can then index the relevant content and expose those relationships through searchable fields, filters, and result templates.
Understand the content model before configuring search
Start by documenting which content types exist and how they relate to one another. A typical WooCommerce site might contain:
- Products: purchasable catalog items managed by WooCommerce.
- Posts: buying guides, announcements, tutorials, and editorial content.
- Pages: evergreen information such as shipping, returns, sizing, and support documentation.
- Custom post types: manuals, case studies, recipes, brands, locations, or technical specifications.
- Taxonomies: product categories, product tags, brands, industries, audiences, and content topics.
- Metadata: SKU values, model numbers, compatibility data, documentation URLs, and other structured attributes.
For each relationship, decide whether it should be represented by a taxonomy, a custom field, or a direct post-to-post connection. Shared taxonomies are usually the most scalable option for broad groupings. Direct relationships are more appropriate when one item specifically references another item, such as a manual belonging to one product.
Use shared taxonomies for discoverable groups
Suppose a store sells commercial kitchen equipment and publishes recipes, manuals, and maintenance articles. A shared taxonomy such as equipment_family can connect products and editorial content without storing a separate list of post IDs in every record.
The taxonomy should be registered for every relevant post type:
register_taxonomy( 'equipment_family', array( 'product', 'post', 'page', 'manual' ), array( 'label' => 'Equipment Families', 'public' => true, 'show_ui' => true, 'show_in_rest' => true, 'hierarchical' => true ) );
A product, a maintenance guide, and a manual can then share the term Commercial Ovens. WPSOLR can index that term for each content type, allowing a search or filtered archive to return all related resources rather than products only.
When designing taxonomies, use controlled terms and documented naming conventions. Avoid creating separate terms such as commercial-oven, commercial ovens, and commercial_ovens for the same concept. Inconsistent terms produce incomplete filters and make relevance tuning harder.
Use direct relationships for specific references
Some connections are not shared categories. A product may have one installation manual, several replacement parts, and a set of compatible accessories. These are explicit relationships and should be stored as structured fields or relationship records.
A common implementation uses a relationship field that stores one or more related post IDs:
$manual_ids = get_post_meta( $product_id, '_installation_manual_ids', true );
Relationship plugins can manage this data through an editorial interface, while a custom implementation can use post meta or a dedicated relationship table. For larger catalogs, a dedicated table may be preferable to a serialized array because it supports efficient queries, validation, and bulk updates.
Do not rely only on visible links in post content. A link from a product description to a manual is useful for visitors, but it is not a dependable data model. Store the relationship explicitly so it can be indexed, audited, synchronized, and used in templates.
Register custom post types for search
Custom post types should be registered with clear visibility and REST settings when they are intended to participate in editorial workflows or headless integrations:
register_post_type( 'manual', array( 'label' => 'Manuals', 'public' => true, 'show_ui' => true, 'show_in_rest' => true, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail' ), 'taxonomies' => array( 'equipment_family' ) ) );
In WPSOLR, review the post type configuration and confirm that the custom post type is included in the index. Also review which fields are indexed, whether the content type is available as a filter, and whether draft, private, or excluded records are omitted as intended.
After changing post type registration, taxonomies, or indexed fields, perform the appropriate reindex operation. Existing indexed documents do not automatically gain newly configured fields until they are processed again.
Index useful relationship fields
Relationship data is only useful in search when it is exposed to the indexer in a consistent form. For each custom field, decide whether it should be indexed as:
- Full-text content: useful when visitors should search the value, such as a model number or compatibility code.
- A filterable field: useful for exact selection, such as brand, format, voltage, or content type.
- A sort field: useful for numeric ratings, release dates, or product sequence values.
- A stored display field: useful when the result template needs to show a label or related identifier.
For example, a product’s related manual title may be searchable as supporting content, while the manual’s product ID should generally be treated as an exact relationship field. Indexing both representations can support human queries such as installation guide and precise queries such as a model number.
Make results distinguishable by content type
When a search returns products, pages, posts, and manuals together, users need to understand what each result represents. Configure result templates to show a content-type label, thumbnail, price where appropriate, publication date, and a relevant excerpt.
Agencies should also provide content-type filters when the combined result set is large. A visitor searching for espresso machine cleaning may want a product, a maintenance article, or a PDF manual. A filter such as Products, Guides, and Manuals reduces ambiguity without requiring separate search forms.
Use consistent labels rather than exposing internal post type keys. The key manual is useful to developers, but the customer-facing label should be something such as Manuals and Documentation.
Build related-content sections from the same model
Search and on-page discovery should use the same relationship data. On a product page, a related-content component can query manuals, guides, and support pages that share the product’s taxonomy terms or explicit relationship IDs.
For example, a product template might display:
- Installation manuals directly attached to the product.
- Buying guides sharing the product family.
- Compatible accessories connected through a relationship field.
- Support articles sharing the product model or issue taxonomy.
Keep the query rules explicit. A shared taxonomy can identify broadly related resources, while direct relationship IDs should take priority for product-specific documentation. Exclude the current object, drafts, and content that the current visitor cannot access.
Plan synchronization and reindexing
Relationships often change independently of the main post. A product may be assigned a new brand, a manual may be connected to a replacement model, or a guide may receive a new taxonomy term. Your publishing workflow should account for these changes.
Test that updates to the following trigger indexing or are included in a scheduled reindex process:
- Post title, content, excerpt, and status.
- Product name, SKU, attributes, price, and stock state.
- Taxonomy assignments.
- Relationship fields and related post IDs.
- Custom fields used for compatibility, model numbers, or documentation.
For large catalogs, avoid rebuilding the entire index for every editorial change. Use incremental updates where supported, and schedule full reindexing for structural changes such as adding a new post type or changing field mappings.
Test the complete customer journey
Test relationships from both directions. A product should find its manuals and guides, but a manual should also lead users to the correct product. Verify searches using product names, SKUs, model numbers, taxonomy terms, and natural phrases used by customers.
- Create one product, one guide, one page, and one custom post type item with known relationships.
- Assign shared taxonomy terms and add at least one direct relationship.
- Reindex the affected content.
- Search for a shared topic and confirm that all intended content types appear.
- Search for an exact SKU or model number and confirm that unrelated content does not dominate the results.
- Remove or change a relationship and verify that stale associations disappear after synchronization.
- Check permissions, private content, pagination, filters, and mobile result layouts.
A connected WordPress and WooCommerce content model gives WPSOLR enough structured information to return more useful results. The most reliable implementations combine shared taxonomies for broad discovery, explicit relationships for precise references, clearly configured post types, and a repeatable indexing process.