{"id":15102,"date":"2025-09-25T01:29:53","date_gmt":"2025-09-25T01:29:53","guid":{"rendered":"https:\/\/www.kadencewp.com\/help-center\/?post_type=docs&#038;p=15102"},"modified":"2026-04-22T16:28:08","modified_gmt":"2026-04-22T16:28:08","password":"","slug":"split-character-filter-query-loop-adv-block","status":"publish","type":"docs","link":"https:\/\/www.kadencewp.com\/help-center\/docs\/kadence-blocks\/split-character-filter-query-loop-adv-block\/","title":{"rendered":"Query Loop (Adv) Block: Split Character Filter"},"content":{"rendered":"\n<p>The <em><strong>kadence_blocks_pro_query_block_split_character<\/strong><\/em> filter allows you to change the character used to <strong>split values<\/strong> in the <strong><a href=\"https:\/\/www.kadencewp.com\/help-center\/docs\/kadence-blocks\/advanced-query-loop-block\/\" target=\"_blank\" rel=\"noreferrer noopener\">Query Loop (Adv) Block<\/a><\/strong> (included in Kadence Blocks Pro).<\/p>\n\n\n\n<p>This is especially useful when your custom field values contain commas (<code>,<\/code>). Such as names with suffixes or city-country pairs, which the default behavior would incorrectly split.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem<\/h2>\n\n\n\n<p>When using the<strong> Query Loop (Adv) Block<\/strong> to filter posts by <strong>custom field values<\/strong> that include commas, like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>John Smith, Jr.<\/code><\/li>\n\n\n\n<li><code>Carlos Sainz, Sr.<\/code><\/li>\n\n\n\n<li><code>Paris, France<\/code><\/li>\n\n\n\n<li><code>Manila, Philippines<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u2026the default split character (<code>,<\/code>) causes these values to break into separate filter terms. This results in <strong>no results<\/strong> being returned.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p>Use the <code>kadence_blocks_pro_query_block_split_character<\/code> filter to change the default comma delimiter to a different character that won&#8217;t conflict with your field values, such as a pipe (|).<\/p>\n\n\n\n<p>Add this PHP code snippet to your website <em><strong>(this will get applied to all Query Loop(Adv) block instances on your website)<\/strong><\/em>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\/\/ Change the Kadence Blocks Pro Advanced Query Loop Block filter split character (default is \",\")\nadd_filter( 'kadence_blocks_pro_query_block_split_character', function() {\n    return '|'; \/\/ Use pipe instead of comma\n});<\/code><\/pre>\n\n\n\n<p>Here&#8217;s our guide: <strong><em><a href=\"https:\/\/www.kadencewp.com\/help-center\/docs\/kadence-theme\/how-to-add-a-custom-filter-or-function-with-code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to add a custom filter or function with Code Snippets<\/a><\/em><\/strong><\/p>\n\n\n\n<p><strong>Note<\/strong>: The new split character <em><span style=\"text-decoration: underline\">must not appear in your custom field values<\/span><\/em>.<\/p>\n\n\n\n<p>Now, Query Loop (Adv) filters will treat each custom field text as a full value and query the posts correctly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The kadence_blocks_pro_query_block_split_character filter allows you to change the character used to split values in the Query Loop (Adv) Block (included in Kadence Blocks Pro). This is especially useful when your custom field values contain commas (,). Such as names with suffixes or city-country pairs, which the default behavior would incorrectly split. The Problem When using&#8230;<\/p>\n","protected":false},"author":115173,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"doc_category":[420],"doc_tag":[],"knowledge_base":[7],"class_list":["post-15102","docs","type-docs","status-publish","hentry","doc_category-blocks-advanced","knowledge_base-kadence-blocks"],"year_month":"2026-04","word_count":239,"total_views":"999","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"display_name":"Karla","author_link":"https:\/\/www.kadencewp.com\/help-center\/author\/karla-levelup\/"},"doc_category_info":[{"term_name":"Advanced","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-blocks\/blocks-advanced\/"}],"doc_tag_info":[],"knowledge_base_info":[{"term_name":"Kadence Blocks","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-blocks\/","term_slug":"kadence-blocks"}],"knowledge_base_slug":["kadence-blocks"],"taxonomy_info":{"doc_category":[{"value":420,"label":"Advanced"}],"knowledge_base":[{"value":7,"label":"Kadence Blocks"}]},"featured_image_src_large":false,"comment_info":0,"_links":{"self":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/15102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/users\/115173"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/comments?post=15102"}],"version-history":[{"count":2,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/15102\/revisions"}],"predecessor-version":[{"id":15149,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/15102\/revisions\/15149"}],"wp:attachment":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/media?parent=15102"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/doc_category?post=15102"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/doc_tag?post=15102"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/knowledge_base?post=15102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}