Displaying User meta in wordpress

Report
Question

Please briefly explain why you feel this question should be reported .

Report
Cancel

Here is how you can display user meta in wordpress page and posts of a user using the following meta function.

<?php
$args = array(
          'post_type' => 'todo_listing',
          'posts_per_page' => 4,
          'order' => 'asc',
          'meta_key' => '1014',
          'meta_query' => array(
              array(
                  'key' => '$id',
                  'meta_value_num' => '1',

                  )
              )
          );
  $loop = new WP_Query( $args );

 ?>     

 <?php
 while ( $loop->have_posts() ) : $loop->the_post();
 ?>
 <?php echo get_the_ID();?> <?php the_title(); ?>


 <?php
endwhile;
?>  
0
WordPress 5 months 0 Answer 247 views 0

About Irfan

I love to Develop Websites, Applications and UI Design. I’m a Certified Developer, blogger and owner of Codexjunction.com. My friends call me WordPress Expert too. I like to learn and share technical stuff. For more info quick message me, I’ll help you out.

Leave an answer

Captcha Click on image to update the captcha .

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>