A site people consult before spending real money owes them more than accurate numbers. It owes them context, when was this captured, what is it for, what is it not. This post is the responsibility layer of the rates site, the visible parts, timestamps and a disclaimer, and the invisible part, structured data telling search engines precisely what the pages are.
The visible foundation is the freshness timestamp. Every rate page and the homepage carry the [sarafa_updated] shortcode, which reads recorded_at from the latest rate row and prints when the number was captured, in Pakistan time:
function srt_sc_updated($atts) {
$a = shortcode_atts(array('city' => 'Pakistan'), $atts);
$rate = srt_get_latest_rate($a['city']);
if (!$rate) { return ''; }
$stamp = get_date_from_gmt($rate->recorded_at, 'j F Y, g:i a');
return '<p class="srt-updated">Rates last updated: ' . esc_html($stamp) . ' PKT</p>';
}
This is the fake-prices lesson made permanent, a number without a capture time asks for blind trust, a number with one lets the reader judge freshness themselves. Beside it sits the disclaimer, plain words on every rate page, rates are indicative, compiled from market sources, actual dealer prices vary with premiums and making charges, confirm before transacting. Not legal wallpaper, a true statement of what compiled market rates are, and where their edges sit.
The invisible half is JSON-LD structured data, small script blocks describing the pages to machines in schema.org vocabulary. The rates themselves are described as a Dataset, and the FAQ sections as FAQPage, matching the visible questions exactly:
$schema = array(
'@context' => 'https://schema.org',
'@type' => 'Dataset',
'name' => 'Silver Rate in Pakistan (per tola)',
'description' => 'Daily silver rates for Pakistani cities, per tola, gram and 10 grams.',
'dateModified'=> get_date_from_gmt($rate->recorded_at, 'c'),
'spatialCoverage' => $city,
);
echo '<script type="application/ld+json">' . wp_json_encode($schema) . '</script>';
The rule that keeps schema honest is single-sourcing, the JSON-LD is generated from the same data the page displays, the same recorded_at feeds dateModified and the visible timestamp, the FAQ schema is built from the same array that renders the on-page FAQs. Structured data that drifts from the visible page is worse than none, search engines treat it as deception, so the schema builder and the page builder eat from one plate. None of this layer is glamorous, and all of it is the difference between a page showing numbers and a source someone is right to consult.
A few things people ask me about this
Does FAQ schema have to match the page word for word? Yes, in substance and presence, schema describing content not visible on the page violates the guidelines it exists to serve. Build both from one array and matching stops being a discipline, it is a property.
Why show the timestamp so prominently, does it not date the page? Dating the number is the point, on rates, freshness is half the information. A prominent recent timestamp is a trust signal, and a stale one is honest warning, both beat silence.
Next
By now the site involved dozens of pages, menus, and settings, and rebuilding it by hand on a fresh install would take a day. Making the theme build the entire site by itself is the next post.
