{"id":372,"date":"2026-04-13T09:07:12","date_gmt":"2026-04-13T07:07:12","guid":{"rendered":"https:\/\/themify.hznknd.de\/template-bugs-1-col-page\/"},"modified":"2026-04-27T08:44:47","modified_gmt":"2026-04-27T06:44:47","slug":"template-bugs-1-col-page","status":"publish","type":"page","link":"https:\/\/themify.hznknd.de\/en\/template-bugs-1-col-page\/","title":{"rendered":"Template Bugs 1-col-page"},"content":{"rendered":"<!--themify_builder_content-->\n<div id=\"themify_builder_content-372\" data-postid=\"372\" class=\"themify_builder_content themify_builder_content-372 themify_builder tf_clear\">\n                    <div  data-lazy=\"1\" class=\"module_row themify_builder_row tb_mj3s847 tb_first tf_w\">\n                        <div class=\"row_inner col_align_top tb_col_count_1 tf_box tf_rel\">\n                        <div  data-lazy=\"1\" class=\"module_column tb-column col-full tb_xk3s848 first\">\n                    <!-- module text -->\n<div  class=\"module module-text tb_jfsg385   \" data-lazy=\"1\">\n        <div  class=\"tb_text_wrap\">\n        <h3>The actual problem: WPML + Themify Builder is not maintainable<\/h3><p>We run a multilingual website with WPML and dozens of pages in multiple languages. Two bugs make this setup unmaintainable in practice:<\/p><ul><li>Hook Content Conditions set for the original page never apply to translated pages \u2013 each condition would have to be manually duplicated for each translation<\/li><li>Builder styles do not automatically synchronize to translated pages \u2013 editors must manually open each translated page in the Builder after every layout change to apply the styles<\/li><\/ul><p>Both problems have the same cause: Themify Builder does not fully utilize the integration APIs provided by WPML.<\/p><hr><h3>Background: How WPML manages pages<\/h3><p>WPML links pages across languages via translation relationships, which are accessible through a dedicated API:<\/p><pre><code>\/\/ \u00dcbersetzung einer Seite in einer anderen Sprache ermitteln\n$translated_id = apply_filters('wpml_object_id', $post_id, 'page', false, $lang);\n\n\/\/ Aktuelle \/ Standard-Sprache abfragen\n$current_lang = apply_filters('wpml_current_language', null);\n$default_lang  = apply_filters('wpml_default_language', null);<\/code><\/pre><p>These APIs exist precisely so that plugins can work WPML-compatible without duplicating logic per language.<\/p><hr><h3>Bug 1: Hook Content Conditions do not apply to translated pages<\/h3><p>In <code>themify\/class-hook-contents.php<\/code>, <code>check_visibility()<\/code> builds the page path via <code>child_post_name()<\/code>:<\/p><pre><code>\/\/ class-hook-contents.php ~Zeile 179\nin_array( '\/' . self::child_post_name( $query_object ) . '\/', $posts )<\/code><\/pre><p><code>child_post_name()<\/code>  recursively runs over <code>post_parent<\/code> and concatenates the <code>post_name<\/code> values. On a translated page, this returns the <strong>English slug<\/strong>, e.g.:<\/p><pre><code>\/services\/production-and-delivery-of-green-hydrogen\/<\/code><\/pre><p>However, the saved Visibility Condition contains the <strong>German slug (default language)<\/strong>:<\/p><pre><code>\/leistungen\/produktion-und-lieferung-von-gruenem-wasserstoff\/<\/code><\/pre><p>The <code>in_array()<\/code> comparison always fails \u2192 Hook Content is never output on translated pages.<\/p><p><strong>Expected Fix<\/strong> \u2013 resolve to the original language version before comparison:<\/p><pre><code>$original_id   = apply_filters('wpml_object_id', $query_object-&gt;ID, 'page', false, $default_lang);<br\/>\n$original_post = get_post($original_id);<br\/>\n$original_path = '\/' . self::child_post_name($original_p\n<\/code><\/pre>    <\/div>\n<\/div>\n<!-- \/module text -->        <\/div>\n                        <\/div>\n        <\/div>\n        <\/div>\n<!--\/themify_builder_content-->","protected":false},"excerpt":{"rendered":"<p>The actual problem: WPML + Themify Builder is not maintainable We run a multilingual website with WPML and dozens of pages in multiple languages. Two bugs make this setup unmaintainable in practice: Hook Content Conditions set for the original page never apply to translated pages \u2013 each condition would have to be manually duplicated for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-372","page","type-page","status-publish","hentry","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/pages\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/comments?post=372"}],"version-history":[{"count":4,"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/pages\/372\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/pages\/372\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/themify.hznknd.de\/en\/wp-json\/wp\/v2\/media?parent=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}