Ready to get started?Download WordPress


[resolved] Custom Fields (2 posts)

  1. imhameed78
    Posted 4 years ago #

    I have used few custom fields with my post like product brand, product price etc. now i wanna print the product price along with the product name (post name) on the top of the post page i.e. alonwith the title. i have ammended my single.php in this way, but it just shows the post title, i can't see the price.

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <h2 class="title">
    <?php the_title();
    get_post_meta(get_the_ID, 'price', true);
    ?> </h2>

    i have used $post->ID and get_the_ID() as well for post_ID.

    don't know wht is missing.

  2. imhameed78
    Posted 4 years ago #

    got it, echo..............

Topic Closed

This topic has been closed to new replies.

About this Topic