• On the main page of the site, i have a section where i list all of the main services we offer. There is a Picture, Title and Description. I am looking for a way where I can limit how long the description can be, with the balance of the description being shown using a “read more” link, or a bubble that pops up when you put the mouse cursor over the description.

    I want to keep all of the descriptions the same length as under the description is a link to book online. It is also much neater to look at if it all lines up.

    Is there a plugin to meet this situation – or an easy way to do it? I do use Elementor.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Kindly try this code:-

    function change_heading_widget_content( $widget_content, $widget ) {
    	if( 'image-box' === $widget->get_name() ){
    		$settings = $widget->get_settings();
    		if( !empty($settings['description_text']) ){
    			$widget_content .= substr($settings['description_text'], 0, 100) . '<div><a href="#">Read More...</a></div>';
    		}
    	}	
    	return $widget_content;
    	  
    }
    add_filter( 'elementor/widget/render_content', 'change_heading_widget_content', 10, 2 );
    Thread Starter Canadian Ken

    (@ckscreative)

    Thank You for providing this snippet of code to try. I appreciate the time you have taken to help me out.

    I am feeling a little “beyond my level” as I am not sure if I should create a child theme (using Hello Theme) to put this in the function file, or should i be placing this somewhere else. If I need to put it somewhere else, I apologize but i have no idea where I would put it.

    Ken

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘There MUST be a Plugin to do this’ is closed to new replies.