I found this code snippet that displays the entire content of the page. What I need is just the page title and an excerpt. What changes do I need to make? Thanks
<?php $page_id = 38; $page_data = get_page( $page_id ); $content = $page_data->post_content; $title = $page_data->post_title; echo $page_data->post_title; echo $page_data->post_content; ?>
- The topic ‘How to get page title and exercpt’ is closed to new replies.