Leave a Reply

2 comments

  1. Do you mean meta like in custom fields or information from post in general?

    Basically as long as you have post id you can get anything you want, not tied to the Loop.

    For custom fields there is get_post_meta().

    For general information (like title or content) there is number of functions (many template tags can be explicitly passed post id, they just default to current Loop item) and there is get_post_field($field, $post); (can’t find in documentation, but self-explaining).

  2. The global variable $post contains all the post details, so that you can use them outside the loop.
    Basically, you can do:

    <?php
    global $post;
    echo get_post_meta($post->ID, 'my-ad', true);
    ?>