Created
April 21, 2024 04:46
-
-
Save codersaiful/68d31ef3f02ed1a53f3e13f0e5b1c8a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wpt_archive_layout', 'wpt_custom_archive_layout' ); | |
/** | |
* Determines the layout for the archive page. Specially for Shop page actually | |
* First enable from Configuration page. | |
* See @link https://wooproducttable.com/docs/doc/table-options/product-table-woocommerce-archive-category-tag-attribute-page/ | |
* | |
* @param string $layout The current view. Available table|grid | |
* @return string The layout for the archive page. Possible values are 'table' or 'grid'. | |
* @author Saiful Islam <[email protected]> | |
*/ | |
function wpt_custom_archive_layout($layout) { | |
if( is_shop() ) return 'table'; | |
return 'grid'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment