Answers for "wordpress get particular page content programmatically"

PHP
0

wordpress get particular page content programmatically

<?php 
$id=47; 
$post = get_post($id); 
$content = apply_filters('the_content', $post->post_content); 
echo $content;  
?>
Posted by: Guest on June-15-2020
0

wordpress get particular page content programmatically

<?php

// would echo post 7's content up until the <!--more--> tag
$post_7 = get_post(7); 
$excerpt = $post_7->post_excerpt;
echo $excerpt;

// would get post 12's entire content after which you
// can manipulate it with your own trimming preferences
$post_12 = get_post(12); 
$trim_me = $post_12->post_content;
my_trim_function( $trim_me );

?>
Posted by: Guest on June-15-2020

Code answers related to "wordpress get particular page content programmatically"

Browse Popular Code Answers by Language