You can use the hooks below if you want to have a different layout for your product category pages than the homepage of your shop. Through these hooks, you can change the Content Block that generates the Header layout and the Content Block that generates the Content layout of the product category pages. In a nutshell, through these hooks, it is possible to overwrite, for the product category pages, when creating a custom layout, the Content Blocks related to Header and Content parts, screenshot ;
Different Content Block for product category Header
/**************************************************************** * * Different Content Block for product category Header * ****************************************************************/ function uncode_child_content_products_cb_header( $val ) { if ( is_product_category() || is_product_tag() ) { $val = 1234; //the Content Block ID you want to use instead of the default one } return $val; } add_filter( 'uncode_ot_get_option_uncode_product_index_blocks', 'uncode_child_content_products_cb_header' );
Different Content Block for product category Content
/**************************************************************** * * Different Content Block for product category Content * ****************************************************************/ function uncode_child_content_products_cb_content( $val ) { if ( is_product_category() || is_product_tag() ) { $val = 5678; //the Content Block ID you want to use instead of the default one } return $val; } add_filter( 'uncode_ot_get_option_uncode_product_index_content_block', 'uncode_child_content_products_cb_content' );
Comments
0 comments
Article is closed for comments.