WordPress.org

Ready to get started?Download WordPress

Forums

Displaying a post in the sidebar (1 post)

  1. Lolley
    Member
    Posted 4 months 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!

Reply

You must log in to post.

About this Topic