{"id":14623,"date":"2020-08-13T11:44:07","date_gmt":"2020-08-13T09:44:07","guid":{"rendered":"https:\/\/marabelia.com\/?p=14623"},"modified":"2025-06-19T12:34:30","modified_gmt":"2025-06-19T10:34:30","slug":"changing-the-related-products-text-in-woocommerce","status":"publish","type":"post","link":"https:\/\/marabelia.com\/en\/changing-the-related-products-text-in-woocommerce\/","title":{"rendered":"Changing the &#8220;Related Products&#8221; Text in WooCommerce"},"content":{"rendered":"<div class=\"wpb-content-wrapper\">[vc_row][vc_column][vc_column_text]To change the &#8220;Related Products&#8221; text in WooCommerce to any other text, simply copy the following code into the &#8220;functions.php&#8221; of your WordPress child theme&#8217;s theme editor.<\/p>\n<p><span style=\"color: #282828;\">Route: <\/span><\/p>\n<p><span style=\"color: #00a859;\">Appearance \/ Theme Editor \/ functions.php<\/span><\/p>\n<p>After the line <code> &lt; ? php <\/code><\/p>\n<p>Add:<code><br \/>\n\/\/ Change the text \"Related products\" in WooCommerce<br \/>\nadd_filter('gettext', 'change_rp_text', 10, 3);<br \/>\nadd_filter('ngettext', 'change_rp_text', 10, 3);<br \/>\nfunction change_rp_text($translated, $text, $domain)<br \/>\n{  if ($text === 'Related products' &amp;&amp; $domain === 'woocommerce') {<br \/>\n$translated = esc_html__('<em>THE NEW TEXT I WANT TO PUT<\/em>', $domain);}<br \/>\nreturn $translated;}<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Replaces &#8216;<em>THE NEW TEXT I WANT TO PUT<\/em> &#8216;for the text you want to appear in that section. Voil\u00e0![\/vc_column_text][\/vc_column][\/vc_row]\n<\/div>","protected":false},"excerpt":{"rendered":"[vc_row][vc_column][vc_column_text]To change the &#8220;Related Products&#8221; text in WooCommerce to any other text, simply copy the following code into the &#8220;functions.php&#8221; of your WordPress child theme&#8217;s theme editor. Route: Appearance \/ Theme Editor \/ functions.php After the line &lt; ? php Add: \/\/ Change the text &#8220;Related products&#8221; in WooCommerce add_filter(&#8216;gettext&#8217;, &#8216;change_rp_text&#8217;, 10, 3); add_filter(&#8216;ngettext&#8217;, &#8216;change_rp_text&#8217;, [&#8230;]\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97,98],"tags":[],"class_list":["post-14623","post","type-post","status-publish","format-standard","hentry","category-woocommerce-2","category-wordpress-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Changing the &quot;Related Products&quot; Text in WooCommerce &#8226; Marabelia | Agencia Digital en Valencia<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/marabelia.com\/en\/changing-the-related-products-text-in-woocommerce\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Changing the &quot;Related Products&quot; Text in WooCommerce &#8226; Marabelia | Agencia Digital en Valencia\" \/>\n<meta property=\"og:description\" content=\"[vc_row][vc_column][vc_column_text]To change the &#8220;Related Products&#8221; text in WooCommerce to any other text, simply copy the following code into the &#8220;functions.php&#8221; of your WordPress child theme&#8217;s theme editor. Route: Appearance \/ Theme Editor \/ functions.php After the line &lt; ? php Add: \/\/ Change the text &quot;Related products&quot; in WooCommerce add_filter(&#039;gettext&#039;, &#039;change_rp_text&#039;, 10, 3); add_filter(&#039;ngettext&#039;, &#039;change_rp_text&#039;, [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/marabelia.com\/en\/changing-the-related-products-text-in-woocommerce\/\" \/>\n<meta property=\"og:site_name\" content=\"Marabelia | Agencia Digital en Valencia\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-13T09:44:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-19T10:34:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/marabelia.com\/wp-content\/uploads\/2025\/09\/Portada-Marabelia-sitio-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin-mbl\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin-mbl\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Changing the \"Related Products\" Text in WooCommerce &#8226; Marabelia | Agencia Digital en Valencia","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/marabelia.com\/en\/changing-the-related-products-text-in-woocommerce\/","og_locale":"en_US","og_type":"article","og_title":"Changing the \"Related Products\" Text in WooCommerce &#8226; Marabelia | Agencia Digital en Valencia","og_description":"[vc_row][vc_column][vc_column_text]To change the &#8220;Related Products&#8221; text in WooCommerce to any other text, simply copy the following code into the &#8220;functions.php&#8221; of your WordPress child theme&#8217;s theme editor. Route: Appearance \/ Theme Editor \/ functions.php After the line &lt; ? php Add: \/\/ Change the text \"Related products\" in WooCommerce add_filter('gettext', 'change_rp_text', 10, 3); add_filter('ngettext', 'change_rp_text', [...]","og_url":"https:\/\/marabelia.com\/en\/changing-the-related-products-text-in-woocommerce\/","og_site_name":"Marabelia | Agencia Digital en Valencia","article_published_time":"2020-08-13T09:44:07+00:00","article_modified_time":"2025-06-19T10:34:30+00:00","og_image":[{"width":800,"height":800,"url":"https:\/\/marabelia.com\/wp-content\/uploads\/2025\/09\/Portada-Marabelia-sitio-1.jpg","type":"image\/jpeg"}],"author":"admin-mbl","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin-mbl","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[]}},"_links":{"self":[{"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/posts\/14623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/comments?post=14623"}],"version-history":[{"count":1,"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/posts\/14623\/revisions"}],"predecessor-version":[{"id":14624,"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/posts\/14623\/revisions\/14624"}],"wp:attachment":[{"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/media?parent=14623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/categories?post=14623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marabelia.com\/en\/wp-json\/wp\/v2\/tags?post=14623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}