• @subhansanjaya could you please respond as i have tried the email link on your website for 2 weeks and have no reply.

    I’m using the pro version. For each product slider, they have a checkbox for getting the excerpt. I have 2 issues:

    1. only the text and not the content (html and ACF Custom Fields) is shown

    2. the length of the excerpt is too short – so i need to increase it. The setting for excerpt length doesn’t increase the length displayed.

    The code for that view is below:

    if($wa_wps_query_posts_display_excerpt==’1′) {

    $slider_gallery.= ‘<div style=”color:’.$wa_wps_query_font_colour.’;” class=”wa_wps_foo_con” id=”wa_wpsjj_foo_con’.$id.’”>’.$this->wa_wps_clean($text_type, $word_imit).'</div>’;

    }

    How would I change this so that it displays whatever is in the excerpt (including html and ACF Custom Feilds) vs just text only and how do i increase the length.

    • This topic was modified 7 years, 6 months ago by amcadc.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author subhansanjaya

    (@subhansanjaya)

    If you are familiar with PHP, you could edit the template files to make any additional changes you require.

    Templates files of the plugin can be found within the wp-content/plugins/woocommerce-product-slider-pro/themes/ directory:

    You can edit files in an upgrade-safe way using overrides. Copy it into a directory within your theme named /woocommerce-product-slider-pro, keeping the same file structure.

    Example: To override or edit the themes wp-content/plugins/woocommerce-product-slider-pro/themes/basic/basic.php to yourtheme/woocommerce-product-slider-pro/themes/basic/basic.php

    The copied file will now override the selected template and you can edit this file to make any customization.

    Please, do not make any changes within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost.

    I hope this helps you.

    If you have any questions, please email to hello@weaveapps.com

    Thank you.

    Thread Starter amcadc

    (@amcadc)

    Hello @subhansanjaya,

    Thanks for getting back to me. We have already been editing our own template file as you have suggested bt we are not able to read the html and ACF custom field shortcodes using the theme file. Can you please advise how to achieve this?

    Andrew

    Plugin Author subhansanjaya

    (@subhansanjaya)

    Hi Andrew,

    Here is some sample code. So, you can get an idea.

    				// display post excerpt with html
    				$slider_gallery.= '<div style="color:'.$wa_wps_query_font_colour.';" class="wa_wps_foo_con" id="wa_wpsjj_foo_con'.$id.'">'.$post_excerpt.'</div>';
    
    				// display post content with html
    				$slider_gallery.= '<div style="color:'.$wa_wps_query_font_colour.';" class="wa_wps_foo_con" id="wa_wpsjj_foo_con'.$id.'">'.$post_content.'</div>';
    			
    				// trim words example for post content
    				$slider_gallery.= '<div style="color:'.$wa_wps_query_font_colour.';" class="wa_wps_foo_con" id="wa_wpsjj_foo_con'.$id.'">'.wp_trim_words( $post_content, 40, '...' ).'</div>';
    			
    
    				// custom field value using function
    				$slider_gallery.= '<div style="color:'.$wa_wps_query_font_colour.';" class="wa_wps_foo_con" id="wa_wpsjj_foo_con'.$id.'">'.get_post_meta($post_id, 'your_field_name', true).'</div>';
    

    If you like the plugin, I’d truly appreciate it, if you can give it a rate.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Increase Excerpt height and shown’ is closed to new replies.