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:


  1. Feature Request: Customers email Ubie Support to request the 'Wrap Excerpt Text' feature for their WooCommerce site.

Ubie Implementation:

  1. Our team accesses the customer's WordPress site.
  2. Navigate to the Content Views Plugin settings.
  3. Locate the section for customizing product excerpts.
  4. Implement the 'wrap_excerpt_text' function to enable text wrapping and formatting options.

Step Guide for Advanced Users (Self-Implementation):


  1. Access WordPress Files: Go to /wp-content/plugins/content-views-query-and-display-post-page/ in your site's directory.
  2. Edit Plugin Files: Locate the file for rendering excerpts (e.g., excerpt.php). Ensure that you back up this file before editing.
  3. Add Wrap Function: Insert the following code snippet at the appropriate place in the file to enable text wrapping for excerpts:
  4. 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.
  5. Revert if Needed: Revert to the original file using your backup if any issues arise.

Code:

// CVPro - Wrap excerpt text
add_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;
}