Home Forums Webzine WordPress Theme Post HTML stripped out on list page templates

This topic contains 8 replies, has 2 voices, and was last updated by  birdwatching 3 years, 2 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2121

    birdwatching
    Participant

    Hey,

    Very happy with this theme, but I need a work around to display my posts html in the full width list page template. Each grid block places all of my post content in <p> tags inside a <div class=”excerpt”> and ignores all other paragraph tags, <br> tags and tags.

    Thanks.

    #2122

    BWSM
    Keymaster

    Hi, thanks

    Could you plz paste your url? I’ll check.

    Best

    • This reply was modified 3 years, 3 months ago by  BWSM.
    #2132

    birdwatching
    Participant
    #2135

    BWSM
    Keymaster

    Try to remove the code in functions.php plz:

    function better_excerpt($text, $excerpt_length) {
    		$text = str_replace(']]>', ']]>', $text);
    		$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
    		// replace </p> with <br> and remove <p>
    		$text = str_replace("<p>", "", $text);
    		$text = str_replace("</p>", "<br/>", $text);
    		$text = strip_tags($text, "<br/>");
    		$text = str_replace("<br>", "", $text);
    		$words = explode(' ', $text, $excerpt_length + 1);
    		if (count($words)> $excerpt_length) {
    			array_pop($words);
    			array_push($words, '...');
    			$text = implode(' ', $words);
    		}
    		$text = ltrim($text, "<br>");
    		$text = trim($text);
    		if ($text == "/>") $text = "";
    		if (substr($text, 0, 2) == "/>") $text = substr($text, 2);
    	//return "<p>$text</p>";
    	return "$text";
    }
    #2169

    birdwatching
    Participant

    Hey,

    I tried removing it and commenting it out and neither had any effect.

    What else could I do?

    #2173

    BWSM
    Keymaster

    Hi,

    Could you plz paste your wp-admin/user/password by “Set as private reply”? I’ll check.

    Best

    #2202

    birdwatching
    Participant
    This reply has been marked as private.
    #2207

    BWSM
    Keymaster

    Hi,

    you could edit the block infomation in excerpt box like the screenshot (the “Ashmore Reef 2014” post): http://d.pr/i/zXgQ

    Best

    • This reply was modified 3 years, 2 months ago by  BWSM.
    #2226

    birdwatching
    Participant

    Thanks, that worked!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.