I use meta and it work in wordpress but it cant show values in site
$tecno_testimonial_post =new WP_Query(
array(
'post_type'=>'testimonial',
'posts_per_page'=> $testimonial_count, ));
if($tecno_testimonial_post ->have_posts()):while($tecno_testimonial_post ->have_posts()):$tecno_testimonial_post ->the_post(); ?>
<div class="testimonial-block-two col-lg-6 col-md-12 col-sm-12">
<div class="inner-box">
<div class="upper-box">
<div class="quote-icon flaticon-two-quotes"></div> <div class="author-info">
<h3>
<?php $my_meta = get_post_meta($post->ID, '_my_meta',true); ?>
<?php if(isset($my_meta['customer']) && !empty($my_meta['customer'])) : ?>
<?php echo $my_meta['customer']; ?>
<?php endif; ?>
</h3>
<div class="designation">
<?php $my_meta = get_post_meta($post->ID, '_my_meta',true); ?>
<?php if(isset($my_meta['position']) && !empty($my_meta['position'])) : ?>
<?php echo $my_meta['position']; ?>
<?php endif; ?>
it can't show customer and position in the site
<?php
$tecno_testimonial_post =new WP_Query(
array(
'post_type'=>'testimonial',
'posts_per_page'=> $testimonial_count,
));
if($tecno_testimonial_post ->have_posts()):while($tecno_testimonial_post ->have_posts()):$tecno_testimonial_post ->the_post();
?>
<!-- Testimonial Block Two -->
<?php $id = get_the_ID();
?>
<div class="testimonial-block-two col-lg-6 col-md-12 col-sm-12">
<div class="inner-box">
<div class="upper-box">
<div class="quote-icon flaticon-two-quotes"></div>
<div class="author-info">
<h3>
<?php $my_meta = get_post_meta($id, '_my_meta',true); ?>
<?php if(isset($my_meta['customer']) && !empty($my_meta['customer'])) : ?>
<?php echo $my_meta['customer']; ?>
<?php endif; ?>
</h3>