Filter the WooCommerce Grid/List Outputs
This file contains 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 | |
/** | |
* Filter the Gridlist Category Description Wrap End Tag. | |
* | |
* Requires Grid/List plugin version 1.1.0 or greater | |
* | |
* @param string $output The output value | |
* | |
* @return string $output The filtered output value | |
*/ | |
add_filter( 'gridlist_cat_desc_wrap_end', 'jdn_filter_gridlist_cat_desc_wrap_end', 10, 1 ); | |
function jdn_filter_gridlist_cat_desc_wrap_end( $output ) { | |
return '</div>'; // this is the default output | |
} |
This file contains 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 | |
/** | |
* Filter the Gridlist Category Description Wrap starting tag. | |
* | |
* Requires Grid/List plugin version 1.1.0 or greater | |
* | |
* @param string $output The output value | |
* | |
* @return string $output The filtered output value | |
*/ | |
add_filter( 'gridlist_cat_desc_wrap_start', 'jdn_filter_gridlist_cat_desc_wrap_start', 10, 1 ); | |
function jdn_filter_gridlist_cat_desc_wrap_start( $output ) { | |
return '<div itemprop="description">'; // this is the default output | |
} |
This file contains 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 | |
/** | |
* Filter the Gridlist horizontal reference (hr) tag. | |
* | |
* Requires Grid/List plugin version 1.1.0 or greater | |
* | |
* @param string $output The output value | |
* | |
* @return string $output The filtered output value | |
*/ | |
add_filter( 'gridlist_hr', 'jdn_filter_gridlist_hr', 10, 1 ); | |
function jdn_filter_gridlist_hr( $output ) { | |
return '<hr />'; // this is the default output | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment