/ Published in: PHP
Using the ID of a page, you can get the content, the featured image and the title to power widgets in your template.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php //Use the Page Id $page_data = get_page(86); $title = $page_data->post_title; $content = apply_filters('the_content', $page_data->post_content); $image = get_the_post_thumbnail($page_id); echo '<a name="'.$link.'"></a>'; echo '<h3>'.$title.'</h3>'; echo $content; echo '<a href="'.get_option('siteurl').'/services/enquire?service='.$link.'">Enquire</a>'; ?>