• Hi Everyone,

    Hope I got the right spot for this question.

    I manage a website that uses custom fields in various places for quick editing. I know I could use plugins to do this far more easily but I believe in hard-coding these sort of things into my templates (as plugins can and will break).

    In this case I’m using this piece of code with success.

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    echo get_post_meta($postid, ‘idname’, true);
    wp_reset_query();
    ?>

    Works fine on all my pages EXCEPT the one I’ve specified as my Blog. I’m not an expert on PHP, I tend to google what I need to know and plug it in (I learn quite a bit this way) but obviously I get stumped when situations like these pop up.

    Could someone please help me understand what I might be doing wrong? Do I need a different kind of code for the page specified as my blog?

    Many thanks in advance

  • The topic ‘Placing Custom Fields on a page defined as Blog’ is closed to new replies.