Home › Forums › Webzine WordPress Theme › Post HTML stripped out on list page templates
- This topic has 8 replies, 2 voices, and was last updated 6 years, 11 months ago by
birdwatching.
- AuthorPosts
- January 21, 2014 at 9:37 am #2121
birdwatching
ParticipantHey,
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.
January 21, 2014 at 12:57 pm #2122Hi, thanks
Could you plz paste your url? I’ll check.
Best
January 21, 2014 at 11:50 pm #2132January 22, 2014 at 6:39 am #2135Try 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"; }
January 24, 2014 at 7:24 pm #2169birdwatching
ParticipantHey,
I tried removing it and commenting it out and neither had any effect.
What else could I do?
January 25, 2014 at 3:34 am #2173Hi,
Could you plz paste your wp-admin/user/password by “Set as private reply”? I’ll check.
Best
January 28, 2014 at 12:14 am #2202birdwatching
ParticipantThis reply has been marked as private.January 28, 2014 at 3:43 am #2207Hi,
you could edit the block infomation in excerpt box like the screenshot (the “Ashmore Reef 2014” post): http://d.pr/i/zXgQ
Best
January 29, 2014 at 10:39 am #2226birdwatching
ParticipantThanks, that worked!
- AuthorPosts
- You must be logged in to reply to this topic.