Part 7 of 12 · Silver Rates Site

The SEO Bug That Silently Skipped My Most Important Pages

Some bugs crash. The dangerous ones just quietly do less than you think. While checking how my pages looked in search results, I found my most important pages, the ones rebuilt and rewritten over the last three posts, showing weak, generic snippets, because their SEO meta descriptions were empty. No error, no warning, every page rendering perfectly, and the meta layer silently missing exactly where it mattered most. This post is the cause and the fix.

The mechanism took an evening to see. SEO plugins like the one I use write a meta description per page if you set one manually, and otherwise fall back to auto-generating it from the page’s content. That fallback works by reading the post’s stored content, and here is the collision, pages designed in a page builder do not keep their real content there. Elementor stores its design as structured data in post meta, and the post_content column holds little or nothing. So the auto-description read effectively empty content, produced effectively empty descriptions, and did it silently, because from its perspective nothing was wrong, it summarised what it found, which was nothing.

Diagnosis first, a loop that audits instead of trusting:

// audit: which important pages have no meta description?
foreach (srt_rate_page_ids() as $pid) {
    $desc = get_post_meta($pid, 'rank_math_description', true);
    if (empty($desc)) {
        error_log('MISSING META: ' . get_the_title($pid) . ' (' . $pid . ')');
    }
}

That printed my worst fear neatly, the builder-designed pages, hubs and several city pages, all missing. The fix has a principle inside it, for pages that matter, stop relying on the fallback at all, explicit meta per page, set programmatically for the generated city pages so it scales with them:

update_post_meta($pid, 'rank_math_title',
    sprintf('%s Rate in %s Today - Live per Tola Price', ucfirst($metal), $city));
update_post_meta($pid, 'rank_math_description',
    sprintf('Today's live %s rate in %s per tola, per gram and per 10 grams, updated from Pakistani market sources with trends and a value calculator.', $metal, $city));

Written once into the page installer, so every generated page is born with real meta, and hand-tuned on the handful of hub pages. The general shape of this bug is worth keeping, silent degradation happens where two systems each behave correctly by their own rules, the builder correctly stores design in meta, the SEO plugin correctly summarises post_content, and the failure lives in the seam between them. Seams do not error. Seams have to be audited.

A few things people ask me about this

Why are my Elementor pages’ auto meta descriptions empty or generic? Because the SEO plugin’s fallback reads post_content and Elementor keeps the design in post meta. Set explicit descriptions on those pages, the fallback has nothing to read.

How do I set SEO meta in code? SEO plugins read their own meta keys, for mine, update_post_meta with rank_math_title and rank_math_description. Setting them in the page installer scales it across generated pages.

Next

Snippets fixed, the site still owed its readers something deeper, the responsible touches a financial site needs, timestamps, disclaimers, and structured data. That is the next post.

Leave a Reply

Your email address will not be published. Required fields are marked *