WordPress.org

Ready to get started?Download WordPress

Forums

Carousel Horizontal Posts Content Slider
[resolved] No text displayed if there is a picture at the beginning of the post (2 posts)

  1. eyephone21
    Member
    Posted 1 year ago #

    Hello!

    Is there a way to strip the html code from the posts in the carousel?
    if there is a picture in the post all the code like "<img class="size-medium wp-image-96 alignleft"....> make the real text in the post not appear..

    Thanks!

    http://wordpress.org/extend/plugins/carousel-horizontal-posts-content-slider/

  2. eyephone21
    Member
    Posted 1 year ago #

    Hello again!

    Asked to my brother, and managed to find the solution.

    In carousel-horizontal-posts-content-slider.php

    find the //limit words part and change it with this

    //limit words
    function tchpcs_clean($excerpt, $substr) {
      $string = strip_tags($excerpt);
    	$string = substr($string, 0, $substr);
    
    	return $string;
    }

    In this way ALL the htmtl is stripped from the excerpt, playing with the strip_tag function ( http://php.net/manual/en/function.strip-tags.php ) you can allow some code, but this is beyond my needs (and skills).

    Ciao!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags