Overview:
Implement the 'wrap_excerpt_text' feature in the Content Views Plugin for WooCommerce sites subscribed to the Ubie Pay Monthly Plan. This enhancement allows for a more aesthetically pleasing and organized display of product excerpts.
Step Guide for Ubie Implementation:
- Feature Request: Customers email Ubie Support to request the 'Wrap Excerpt Text' feature for their WooCommerce site.
Ubie Implementation:
- Our team accesses the customer's WordPress site.
- Navigate to the Content Views Plugin settings.
- Locate the section for customizing product excerpts.
- Implement the 'wrap_excerpt_text' function to enable text wrapping and formatting options.
Step Guide for Advanced Users (Self-Implementation):
- Access WordPress Files: Go to /wp-content/plugins/content-views-query-and-display-post-page/ in your site's directory.
- Edit Plugin Files: Locate the file for rendering excerpts (e.g., excerpt.php). Ensure that you back up this file before editing.
- Add Wrap Function: Insert the following code snippet at the appropriate place in the file to enable text wrapping for excerpts:
- Save and Test: Save the changes and upload the file to the server if editing locally. Test the feature by viewing product excerpts on your site.
- Revert if Needed: Revert to the original file using your backup if any issues arise.
Code:
// CVPro - Wrap excerpt textadd_filter( 'pt_cv_excerpt_html', 'cvp_theme_wrap_excerpt_html', 100, 2 );function cvp_theme_wrap_excerpt_html( $args, $post ) {$args = sprintf("<div class='cv-excerpt-text'>$args</div>");return $args;}