• Resolved imhameed78

    (@imhameed78)


    hi,
    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.
    regards

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Fields and Post Meta Data’ is closed to new replies.