0

I am trying to get meta_key value but this code does not work .

  <?php $des=get_post_meta($wdm_auction->ID, 'Product_Year', true );
                   echo $des;
                    //echo $ua_active_terms = wp_get_post_terms($wdm_auction->ID, 'auction-status',true);
                   ?>
3
  • Please give error and put all code here Jul 31 '17 at 10:36
  • No error , I am not able to get meta key value through this , any help
    – sanjay
    Jul 31 '17 at 10:38
  • var_dump this line $wdm_auction->ID. ID get or not? and conform your key name same or not? Jul 31 '17 at 10:41
-1

Pulled with $post using global.

global $post;
$des = get_post_meta($post->ID, $field['Product_Year'], true);
echo $des;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.