WordPress.org

Forums

Displaying a post in the sidebar (1 post)

  1. Lolley
    Member
    Posted 1 year ago #

    Very simply, I would like to be able to call a post into my sidebar of certain pages on my site.

    I have used this code to display images, text and also a form:

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, 'customField', true);
    ?>

    I just can't work out how to show a post!

Topic Closed

This topic has been closed to new replies.

About this Topic