Using AFFINGER5 Custom Fields For Review Schema Markup
A well-structured review can earn a more informative search result, with a star rating, score, review count, or other product details displayed beneath the page title. These review snippets are generated from structured data, usually in JSON-LD, which helps Google understand the relationship between your article, the item being reviewed, and the rating you have given it.
AFFINGER5 is useful for this type of publishing because it gives WordPress users flexible page layouts and access to custom fields. By storing review data in consistent fields and outputting it through your theme template, you can manage affiliate reviews without manually rewriting schema code on every page. The key is to keep the markup accurate, visible, and aligned with Google’s structured data guidelines.
What Custom Fields Add To A Review Workflow
Custom fields are additional WordPress values attached to a post. For a review article, they can store information such as the product name, rating, price, author, pros, cons, and date updated. AFFINGER5 can then display selected values in the article while a template or code snippet converts the same information into JSON-LD.
This approach is more reliable than typing a rating directly into several unrelated areas. If the score changes from 4.0 to 4.5, you can update one field and reduce the risk of showing different values in the review box, article text, and structured data. Consistency matters because search engines compare the markup with the visible page.
For an Australian blog, fields can also hold market-specific information. A product may have a different price in AUD, a local retailer, or a different availability status from the United States. If a review targets readers in Sydney, Melbourne, Brisbane, or regional areas, make the market and currency clear rather than copying specifications from an overseas product page.
Fields Worth Creating In AFFINGER5
Before adding code, decide which values every review should contain. Use simple field names without spaces so they are easy to reference in a WordPress template. You can add them through the custom fields panel, an advanced custom fields plugin, or another field management method compatible with your AFFINGER5 setup.
A practical set of fields for a product review includes the following:
review_product_namefor the exact product or service namereview_ratingfor a numeric score such as 4.5review_best_ratingfor the maximum score, usually 5review_authorfor the person or editorial identity providing the reviewreview_price_audfor a current Australian price, if relevantreview_date_modifiedfor the date the review was last checked
Use a second group for purchasing and editorial information. Fields such as review_brand, review_sku, review_offer_url, review_pros, and review_cons can support the content, although not every field belongs in the Review schema itself. A review should describe an actual evaluation, rather than functioning as a collection of sales data.
The visible page should show the score in ordinary text, for example, “Rated 4.5 out of 5 after six weeks of use.” If the page displays a price in Australian dollars, use the same value in the relevant offer markup and state when the price was checked. Australian shoppers are familiar with GST-inclusive pricing, so avoid presenting an overseas price as though it were a local retail price.
Connecting Custom Fields To JSON-LD
The simplest implementation is to retrieve custom field values in the WordPress template and print a JSON-LD script. Place the code in a child theme or a safe code-management system rather than editing the parent AFFINGER5 files directly. Parent theme updates can overwrite custom changes.
A simplified example for a review post might look like this:
<?php
$product = get_post_meta(get_the_ID(), 'review_product_name', true);
$rating = get_post_meta(get_the_ID(), 'review_rating', true);
$best = get_post_meta(get_the_ID(), 'review_best_rating', true);
$author = get_post_meta(get_the_ID(), 'review_author', true);
if ($product && $rating && $best) :
$schema = [
'@context' => 'https://schema.org',
'@type' => 'Review',
'itemReviewed' => [
'@type' => 'Product',
'name' => $product
],
'reviewRating' => [
'@type' => 'Rating',
'ratingValue' => (float) $rating,
'bestRating' => (float) $best,
'worstRating' => 1
],
'author' => [
'@type' => 'Person',
'name' => $author ?: get_the_author()
],
'reviewBody' => wp_strip_all_tags(get_the_content())
];
?>
<script type="application/ld+json">
<?php echo wp_json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); ?>
</script>
<?php endif; ?>
This example is intentionally limited. A production implementation should validate empty values, escape output correctly, use a stable author identity, and avoid placing the entire article in reviewBody if the content is too long or contains unsuitable markup. You may also need to connect the Review object to a separate Product object when adding brand, SKU, image, offers, or availability.
If AFFINGER5 or another SEO plugin already outputs review schema, do not add a second competing block without checking the source code. Duplicate or conflicting JSON-LD can make debugging difficult. Choose one system as the source of truth and disable overlapping schema features where appropriate.
Displaying Ratings Without Misleading Search Engines
The rating in the custom field must match what readers can see. If your review box says 4.5 stars but the JSON-LD says 5, the structured data is misleading. The same issue occurs when an old rating remains in the source code after the article has been updated.
Use a consistent scale and explain it near the review summary. A score of 8.5 out of 10 should not be converted to 4.25 out of 5 in the schema unless the conversion is transparent and genuinely reflects your scoring method. Half-star displays should also be backed by a numeric value that the page explains.
Review snippets have eligibility limits. Product reviews, software reviews, books, recipes, and other supported content types may qualify, but structured data cannot guarantee a star result. Self-serving reviews for a business or organisation may not be eligible for the same treatment. Google can also ignore markup that is technically valid but does not accurately represent the page.
Before publishing, check the following details:
- The reviewed item is clearly identified in the article
- The rating is visible without opening hidden tabs or accordions
- The author or reviewer identity is shown on the page
- The score uses a defined minimum and maximum
- The review describes real testing, experience, or evaluation
- Product claims and prices are current for the Australian market
For affiliate content, disclose the commercial relationship in a noticeable position. A comparison page covering NBN plans, camping equipment, or software subscriptions should make it clear when links may earn a commission. Honest disclosures support reader trust and help distinguish your independent assessment from a retailer’s product description.
Testing AFFINGER5 Schema Before Publishing
After saving a review with custom field values, inspect the page source and search for application/ld+json. Confirm that the product name, score, author, and review text are present only once or are correctly connected across multiple schema blocks. The rendered page should be tested while logged out, because some theme elements can appear differently to administrators.
Google’s Rich Results Test is useful for checking whether the page can be parsed as a review or product result. Schema.org’s validator can reveal structural problems even when a feature is not eligible for a Google enhancement. Treat warnings separately from errors, but investigate anything that removes the reviewed item, rating value, author, or required product information.
Test a sample of pages rather than assuming every AFFINGER5 post behaves identically. A missing custom field may cause the script to disappear, while a comma in a price field may create an invalid number. Australian pricing should use a numeric value such as 129.95 in structured data, with AUD specified through the appropriate currency property, while the visible page can display $129.95.
Keep a small maintenance routine for older reviews. When checking an article, verify availability, retailer links, screenshots, product versions, and the modified date. For ideas about organising publishing research and review resources, Rainy Lemon guides can sit alongside your broader content workflow without replacing first-hand testing.
Managing Updates And Search Performance
Schema markup is part of the publishing system, not a shortcut to higher rankings. A page still needs useful analysis, clear headings, original photographs or evidence where appropriate, and an explanation of who the product suits. A correctly coded 4.5-star rating cannot compensate for a thin article that repeats manufacturer copy.
AFFINGER5 custom fields become especially valuable when a site has many reviews. You can standardise the review summary, show a consistent score panel, and update important information without editing several template sections. This works well for Australian buying guides where prices, delivery regions, warranty terms, and local availability can change frequently.
Review Search Console performance after deployment, but allow time for crawling and reprocessing. Watch for manual actions, structured data errors, sudden drops in indexed review pages, or snippets that disappear after a template change. Keep a backup of the child theme and record which fields are required before changing the schema format.
A clean implementation has three matching layers: the custom fields hold the source data, the AFFINGER5 layout displays that data to readers, and the JSON-LD describes the same facts to search engines. When those layers remain aligned, your review pages have a stronger technical foundation for eligible rich results and a clearer experience for Australian visitors.