• 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 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Fields’ is closed to new replies.