WordPress.org

Ready to get started?Download WordPress

Forums

Custom Fields in a template file - not working (1 post)

  1. krystiank
    Member
    Posted 4 years ago #

    Is this normal? I have custom template called news.php with

    <?php
    /*
    Template Name: News
    */
    ?>

    My custom fields are not showing up for some reason. When I paste the same code in page.pgp it works fine.

    <?php $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?>
    and
    <img src="/wp-content/uploads/<?php $thumbnail ?>" border="0" alt="" />

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.