• <?php
        $producer = get_post_meta($post->ID, 'producer', true);
        _e($producer);
    ?>

    [Please post code snippets between backticks or use the code button.]

    That’s a snippet of some post meta info I retrieve on my index posts. Where I insert it in my index.php, and the post doesn’t contain that post meta info, there’s a big gap between the title and body where the post meta info would go if there was post meta info (IE. only certain categories require it for my posts ). How would I go about eliminating that space if there was no post meta info?

    More clarification can be made.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try:

    <?php
    if( get_post_meta($post->ID, 'producer', true) )
    $producer = get_post_meta($post->ID, 'producer', true);
        _e($producer);
    ?>
    Thread Starter teckn1caLity

    (@teckn1cality)

    Worked perfectly, thanks for the help.

    Also, could you check out my previous thread concering the user meta info? For some reason the commands I posted aren’t retreiving any information for my author templates, since like a week ago.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘POST META HELP’ is closed to new replies.