{"id":5813,"date":"2026-09-24T16:56:42","date_gmt":"2026-09-24T07:56:42","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/tsf-sitemap-add-bogo-posts-2\/"},"modified":"2026-09-24T16:56:44","modified_gmt":"2026-09-24T07:56:44","slug":"tsf-sitemap-add-bogo-posts","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/wordpress-blog-seo\/tsf-sitemap-add-bogo-posts\/","title":{"rendered":"How to Add Bogo&#8217;s English Articles to The SEO Framework&#8217;s Sitemap"},"content":{"rendered":"<p>When implementing multilingual support in WordPress, &#8220;Bogo&#8221; is widely used as a simple and lightweight plugin. However, in environments where &#8220;The SEO Framework&#8221; (hereafter TSF) is used concurrently as an SEO plugin, specification issues arise during standard XML sitemap generation.<\/p>\n<p>Even if you create and publish translated versions of Japanese articles (such as English articles) using Bogo, the sitemap (sitemap.xml) automatically generated by TSF will only output the original Japanese articles, and the URLs of the English articles will not be added at all. Leaving this state unaddressed prevents search engine crawlers from being notified of the existence of multilingual articles, leading to significant delays in indexing and missed opportunities.<\/p>\n<h2>Automatic Registration of English Article URLs and Last Modified Dates to the XML Sitemap<\/h2>\n<p>The purpose of this article is to dynamically and automatically add published English articles created by Bogo (posts with the en_US locale) to the XML sitemap generated by TSF.<\/p>\n<p>Rather than simply adding the URLs, the last modified date (Lastmod) of each article is also accurately linked and outputted. This creates an environment where search engine crawlers can retrieve appropriate update information when new articles are published or past articles are updated.<\/p>\n<h2>Three Technical Factors Preventing Sitemap Addition and Reflection<\/h2>\n<p>During our investigation, three factors were identified that hinder the addition and proper display of English articles in the sitemap.<\/p>\n<h3>Automatic Query Filtering by Bogo<\/h3>\n<p>If you attempt to retrieve posts using standard WordPress functions (such as get_posts), Bogo&#8217;s internal filters kick in and automatically exclude articles outside the current language context (defaulting to Japanese) from the query results. As a result, standard queries process zero English articles.<\/p>\n<h3>Strictness of Array Specifications Required by The SEO Framework<\/h3>\n<p>TSF&#8217;s sitemap extension filter hook (<a href=\"https:\/\/kb.theseoframework.com\/kb\/filter-reference-for-the-seo-framework\/#sitemap-related\">the_seo_framework_sitemap_additional_urls<\/a>) is designed to accept URLs as array &#8220;keys&#8221; and store &#8220;associative array-format metadata&#8221; in their values. If the format does not match, URLs will be numerically indexed or the update date (lastmod) will be discarded and left blank.<\/p>\n<h3>Multi-layered Caching by Web Servers and CDNs<\/h3>\n<p>In environments where OpenLiteSpeed&#8217;s cache module (LiteSpeed Cache) or the QUIC.cloud CDN is enabled, access to sitemap.xml is heavily cached as static files on edge servers and elsewhere. This causes the PHP processing in functions.php itself to be bypassed, resulting in a state where configuration changes and debug logs are not output.<\/p>\n<h2>Implementing Hooks via functions.php and Configuring Multi-Layered Cache Exclusions<\/h2>\n<p>To resolve the above factors, we will implement direct data retrieval from the database, construct an associative array compliant with TSF specifications, and configure cache exclusion settings.<\/p>\n<h3>Adding Code to functions.php<\/h3>\n<p>Add the following code to your child theme&#8217;s functions.php. To bypass Bogo&#8217;s query exclusion, we use $wpdb to directly retrieve the en_US article IDs and update dates from the database, and assign them to an array structure tailored to TSF&#8217;s specifications.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\/\/ =================================================================\n\/\/ The SEO Framework: Add Bogo English Articles to Sitemap (Official Spec Compliant)\n\/\/ =================================================================\nadd_filter( &#039;the_seo_framework_sitemap_additional_urls&#039;, function( $custom_urls ) {\nglobal $wpdb;\n\nif ( ! is_array( $custom_urls ) ) {$custom_urls = array();\n}\n\n\/\/ 1. Directly retrieve published article IDs and update dates for &quot;en_US&quot; from MariaDB\n$en_posts =$wpdb-&gt;get_results( &quot;\n    SELECT p.ID, p.post_modified_gmt \n    FROM {$wpdb-&gt;posts} p\n    INNER JOIN {$wpdb-&gt;postmeta} pm ON p.ID = pm.post_id\n    WHERE p.post_status = &#039;publish&#039;\n      AND p.post_type = &#039;post&#039;\n      AND pm.meta_key = &#039;_locale&#039;\n      AND pm.meta_value = &#039;en_US&#039;\n&quot; );\n\nif ( empty( $en_posts ) ) {\n    return $custom_urls;\n}\n\n\/\/ 2. Assign in an associative array format adhering to official TSF specifications (URL as key, lastmod array as value)\nforeach ( $en_posts as$post ) {\n    $permalink = get_permalink($post-&gt;ID );\n\n    if ( function_exists( &#039;bogo_url&#039; ) ) {\n        $permalink = bogo_url($permalink, &#039;en_US&#039; );\n    }\n\n    $custom_urls&#x5B;$permalink ] = array(\n        &#039;lastmod&#text&#039; =&gt; $post-&gt;post_modified_gmt,\n    );\n}\n\nreturn $custom_urls;\n}, 10, 1 );\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>LiteSpeed Cache Exclusion Settings<\/h3>\n<p>Add LiteSpeed Cache exclusion settings so that the sitemap is generated dynamically.<\/p>\n<p>Open the WordPress admin dashboard and go to &#8220;LiteSpeed Cache&#8221; > &#8220;Cache&#8221; > &#8220;[4] Excludes&#8221;, and register the following under &#8220;Do Not Cache URIs&#8221;:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/feed\n\/feed\/\nsitemap.xml\nsitemap_index.xml\n\/sitemap\n\/wp-sitemap\n<\/pre>\n<p>Also, if you are using static CDN features, add sitemap.xml and sitemap_index.xml to the &#8220;Excludes Paths&#8221; under &#8220;[CDN]&#8221; > &#8220;Static CDN Settings&#8221;.<\/p>\n<h3>Complete Cache Purge<\/h3>\n<p>After saving the settings, completely clear the following caches:<\/p>\n<ol>\n<li>Open the WordPress admin &#8220;SEO&#8221; settings and click &#8220;Save Changes&#8221; to regenerate TSF&#8217;s internal transient cache.<\/li>\n<li>Run &#8220;Purge All&#8221; in LiteSpeed Cache.<\/li>\n<li>Run &#8220;Purge CDN Cache&#8221; from the QUIC.cloud dashboard or admin screen.<\/li>\n<\/ol>\n<h2>Proper Display of English URLs and Last Updated Dates in the Sitemap<\/h2>\n<p>After purging the cache, we accessed and verified the sitemap endpoint from a browser and terminal.<\/p>\n<p>Verification URL:<br \/>\n<a href=\"https:\/\/donguri3.net\/sitemap.xml\">https:\/\/donguri3.net\/sitemap.xml<\/a><\/p>\n<pre><\/pre>\n<p>As an output result, we confirmed that the CDN and web server cache statuses were bypassed, and all English article URLs (e.g., https:\/\/donguri3.net\/en\/&#8230;) were successfully added to the XML source. We also verified that accurate update dates were outputted to the &lt;lastmod&gt; tags corresponding to each URL, and the correct dates and times were displayed in the &#8220;Last Updated&#8221; column on the browser&#8217;s XSL stylesheet display.<\/p>\n<h2>Conclusion<\/h2>\n<p>We identified the cause and implemented a countermeasure for the issue where English articles created with Bogo were not being outputted to The SEO Framework sitemap. To bypass Bogo&#8217;s language filters, we implemented code to directly extract data using $wpdb and pass it to the hook in an associative array structure compliant with TSF specifications. Furthermore, by executing cache exclusions and purging for LiteSpeed Cache and the QUIC.cloud CDN, all English article URLs and accurate update dates were successfully reflected on the sitemap.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When implementing multilingual support in WordPress, &#8220;Bogo&#8221; is widely used as a simple and lightwe [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":5564,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=5563","footnotes":""},"categories":[1166],"tags":[52,15,14,61,10],"class_list":["post-5813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-blog-seo","tag-https","tag-litespeed","tag-openlitespeed","tag-wordpress","tag-server","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=5813"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5813\/revisions"}],"predecessor-version":[{"id":5816,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5813\/revisions\/5816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/5564"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=5813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=5813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=5813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}