You can use a hook to edit the output. This way you can e.g. output a fallback text for an empty template.
Listen
function atkp_modify_output_list_callback( $output, $products, $template ) {
return $output ;
}
add_filter( 'atkp_modify_output_list', 'atkp_modify_output_list_callback', 10, 3);
Parameter Description output The generated HTML which will be output. products The products (aktp_product) which were used in the list. template Template ID or template name (if from the file system). Return value The overridden HTML.
Products
function atkp_modify_output_product_callback( $output, $product, $template ) {
return $output ;
}
add_filter( 'atkp_modify_output_product', 'atkp_modify_output_product_callback', 10, 3);
Parameter Description output The generated HTML which will be output. product The product (aktp_product) which is displayed. template Template ID or template name (if from the file system). Return value The overridden HTML.
Search form
function atkp_modify_output_searchform_callback( $output, $template ) {
return $output ;
}
add_filter( 'atkp_modify_output_searchform', 'atkp_modify_output_searchform_callback', 10, 2);
Parameter Description output The generated HTML which will be output. template Template ID or template name (if from the file system). Return value The overridden HTML.