Currently I have a post with <strong>
and <em>
tags, and <p>
tags. But they all seem to be being outputted as plain text, and not formatted HTML
I am using laravel blade as my templating engine. I currently have:
@php
$page = get_page_by_title( 'Test Page' );
$content = apply_filters( 'the_content', $page->post_content );
@endphp
Which outputs:
<p>This is a test page for development practice.</p> <p>Here is another line etc</p> <p><strong>BOLD TEXT</strong></p> <p><em>ITALIC TEXT</em></p>
When it needs to be:
This is a test page for development practice.
Here is another line etc
BOLD TEXT
ITALIC TEXT
This answer:
How to output only the post content suggests to use apply_filters( 'the_content', $post->post_content );
which is what I'm currently doing
how do you have content outputted as HTML and not plain text?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745188356a4615743.html
评论列表(0条)