V
V
Valen962018-03-25 04:35:39
WordPress
Valen96, 2018-03-25 04:35:39

How to get page content NOT in Wordpress loop?

Tell me how to get the content of the page, without the wordpress cycle? is there an analogue of the_content() function; only to substitute the page id?
for the page title I found the function <?php single_post_title(); ?>
works great, is there a similar one for post content?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr Crabbz, 2018-03-25
@Punkie

Content in unformatted form: https://wp-kama.ru/function/get_the_content
And this is how you can format it:

<?php
echo apply_filters( 'the_content', get_the_content($ID) );
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question