• Hey there,

    hope somebody can help me on this one.

    I am using this code to show content of a certain page in the home page:

    <?php
    $page_id = 293;
    $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_excerpt;
    ?>

    I want to show the title of the page, the excerpt and the featured image. Like this I get easily the title and the excerpt, but I am looking for a way to show the featured image too.

    Thank you,

    Chiara

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘display featured image on index.php outside the loop’ is closed to new replies.