{"id":1390,"date":"2017-02-21T15:08:30","date_gmt":"2017-02-21T15:08:30","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=1390"},"modified":"2023-12-27T09:02:38","modified_gmt":"2023-12-27T09:02:38","password":"","slug":"replace-woocommerce-related-products-layout-by-cvpro-layout","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/replace-woocommerce-related-products-layout-by-cvpro-layout\/","title":{"rendered":"Replace Woocommerce related products layout"},"content":{"rendered":"<p>Replacing layout of Woocommerce related products is super easy.<br \/>\nHere is all what you have to do:<br \/>\n&#8211; create new folder <code>woocommerce<\/code> (if not exist) in folder of active theme <code>wp-content\/themes\/active_theme\/<\/code><br \/>\n&#8211; create new sub-folder <code>single-product<\/code> (if not exist) in above folder<br \/>\n&#8211; create new file <code>related.php<\/code> in the sub-folder<br \/>\n&#8211; copy below code to above file (replace <code>VIEW_ID<\/code> with <a href=\"http:\/\/contentviewspro.com\/documentation\/article\/what-is-id-of-a-view\/\" target=\"_blank\" rel=\"noopener noreferrer\">ID of View<\/a>)<\/p>\n<p>Here is the code:<br \/>\n<a target=\"_blank\" href=\"https:\/\/gist.githubusercontent.com\/ptguy\/6b60c0aaed3dab966ee9e6585e2a982f\/raw\/\" rel=\"noopener\">click here to open<\/a>.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/ptguy\/6b60c0aaed3dab966ee9e6585e2a982f.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Replacing layout of Woocommerce related products is super easy. Here is all what you have to do: &#8211; create new folder woocommerce (if not exist) in folder of active theme wp-content\/themes\/active_theme\/ &#8211; create new sub-folder single-product (if not exist) in above folder &#8211; create new file related.php in the sub-folder &#8211; copy below code to &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/replace-woocommerce-related-products-layout-by-cvpro-layout\/\"> <span class=\"screen-reader-text\">Replace Woocommerce related products layout<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[50],"doc_tag":[10,20],"class_list":["post-1390","docs","type-docs","status-publish","hentry","doc_category-woocommerce","doc_tag-replace-layout","doc_tag-woocommerce"],"year_month":"2026-09","word_count":76,"total_views":"3","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin1","author_nicename":"admin1","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/admin1\/"},"doc_category_info":[{"term_name":"WooCommerce","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/woocommerce\/"}],"doc_tag_info":[{"term_name":"replace layout","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/replace-layout\/"},{"term_name":"WooCommerce","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/woocommerce\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=1390"}],"version-history":[{"count":1,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1390\/revisions"}],"predecessor-version":[{"id":5365,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/1390\/revisions\/5365"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=1390"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=1390"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=1390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}